Cost Tracking

OpenMontage tracks every paid operation through CostTracker and records decisions, media reviews, and pre-render checks as auditable artifacts. These mechanisms run automatically as the agent executes stages; there is no separate CLI to invoke them.

Budget Configuration

Configure controls in config.yaml:

budget:
  mode: warn
  total_usd: 10.00
  reserve_pct: 0.10
  single_action_approval_usd: 0.50
  require_approval_for_new_paid_tool: true
  • mode accepts observe (track only), warn (log overruns), or cap (reject exceeding operations).
  • Usable budget subtracts the reserve holdback.
  • See Budget Governance for mode details and Configuration for the full file.

CostTracker Lifecycle

CostTracker (instantiated per project) follows this sequence for every paid tool call:

  1. estimate(tool, operation, estimated_usd) — records a pre-execution estimate.
  2. reserve(entry_id) — locks the amount; raises ApprovalRequiredError above the single-action threshold or for first-time paid tools.
  3. reconcile(entry_id, actual_usd) — records final spend and clears the reservation.

Results persist to pipeline/<project_id>/cost_log.json. A snapshot also appears in every checkpoint under cost_snapshot.

Decision Logging

All consequential choices are appended to pipeline/<project_id>/decision_log.json. The log is merged automatically by write_checkpoint and referenced from proposal_packet.production_plan.decision_log_ref.

Typical entries include provider selections, render runtime choices, and music plans. Inspect the file directly or via the latest checkpoint to audit why a specific tool or runtime was selected.

Source Media Review

When user-supplied media files exist in the project, source_media_review must be produced before the first planning stage. It is generated by probing files with audio_probe, frame_sampler, scene_detect, and transcriber.

The artifact records per-file technical details, quality risks, representative frames, and planning implications (e.g., source-led vs. generated approach). It is stored alongside canonical artifacts and carried forward in checkpoints.

Composition Validator

Before calling video_compose or hyperframes_compose, the composition_validator tool performs a pre-render check on the planned cuts.

It verifies:

  • All referenced assets exist under the correct runtime root.
  • Cut durations are non-negative and narration does not exceed video length.
  • Music and audio presence.

It returns valid, errors, warnings, and counts. Failures block the compose stage.

Integration with Proposals and Checkpoints

  • proposal_packet includes cost_estimate (total, line items, budget verdict) and delivery_promise.
  • Every checkpoint for a completed or awaiting-human stage must contain the canonical artifact plus cost_snapshot and any review.
  • edit_decisions carries the locked render_runtime and is validated against the promise at compose time.
  • See Checkpoint System, Project Workspace, and Running Pipelines for how these artifacts flow through stages.