Surfaced while planning the #740/#741 model-configuration stack. Filed separately because it is a pre-existing docs↔code mismatch, independent of the Opus 5 bump.
Scope note: this issue is not a proposal to change the unlimited-by-default posture. That posture is deliberate. This is about being able to answer the customer question "Where do I set max_budget_usd?" correctly and completely — today one of the four documented answers points at a knob that does not exist.
The mismatch
docs/guides/USER_GUIDE.md promises a per-repo Blueprint budget default in two places:
:226 — table row: max_budget_usd | "Default cost budget in USD per task" | "None (unlimited)", listed under Blueprint per-repository settings
:370 — "Overrides the per-repo Blueprint default"
But cdk/src/constructs/blueprint.ts has no maxBudgetUsd prop. It implements maxTurns (line 90, written at :251/:343/:360/:377) and simply omits the budget. Verified: grep -n max_budget_usd cdk/src/constructs/blueprint.ts returns nothing.
The type surface makes it look supported, which is why this went unnoticed:
RepoConfig.max_budget_usd?: number exists (cdk/src/handlers/shared/repo-config.ts:39)
BlueprintConfig.max_budget_usd?: number exists (:74)
cli/src/repo-onboard.ts:116 preserves an existing value on re-onboard
cli/src/repo-display.ts:109,188 renders it with a blueprint field source
So every layer can read and carry a per-repo budget, and nothing can write one. The blueprint field source in repo-display is unreachable for this field.
Verified: where it actually can be set
| Surface |
How |
Works? |
| Per task, CLI |
bgagent submit --max-budget <dollars> (cli/src/commands/submit.ts:69), validated 0.01–100 (:137) |
✅ |
| Per task, REST |
max_budget_usd in POST /v1/tasks (USER_GUIDE.md:370) |
✅ |
| Local batch only |
MAX_BUDGET_USD env (agent/src/config.py:688); ECS strategy forwards the payload value as this env var (ecs-strategy.ts:216). Not read in deployed AgentCore server mode — see agent/README.md:124 |
⚠️ narrow |
| Per repo, Blueprint |
agent.maxBudgetUsd |
❌ not implemented |
| Platform default |
— |
❌ none by design; unset ⇒ unlimited (USER_GUIDE.md:231) |
Why it matters now
With a heavier-token default model landing (#745 — same $5.00/MTok rate, ~1.17x token volume on an identical prompt), the natural operator question is "how do I cap this per repo?" The honest answer today is you can't — only per task, or by choosing a lighter-token model per repo via blueprint agent.modelId. That is a legitimate answer, but the docs currently imply a budget knob exists, which sends operators looking for a prop that isn't there.
Resolution — pick one
Option A (docs-only, smallest). Correct USER_GUIDE.md:226/:231 to state that per-repo budget defaults are not currently supported, and point operators at the per-task flag plus the per-repo agent.modelId model-choice lever. Also correct docs/design/REPO_ONBOARDING.md if it repeats the claim.
Option B (implement the prop). Add maxBudgetUsd to BlueprintProps.agent mirroring maxTurns exactly — the write paths at blueprint.ts:251/:343/:360/:377, plus validation matching the CLI's 0.01–100 range so the two boundaries agree. Read path and CLI display already exist, so this is a small, well-patterned change.
Recommend B if a per-repo budget is genuinely wanted (the plumbing is already 80% there and the docs already promise it), otherwise A. Either way the docs and code must agree.
Acceptance criteria
Related
Surfaced while planning the #740/#741 model-configuration stack. Filed separately because it is a pre-existing docs↔code mismatch, independent of the Opus 5 bump.
Scope note: this issue is not a proposal to change the unlimited-by-default posture. That posture is deliberate. This is about being able to answer the customer question "Where do I set
max_budget_usd?" correctly and completely — today one of the four documented answers points at a knob that does not exist.The mismatch
docs/guides/USER_GUIDE.mdpromises a per-repo Blueprint budget default in two places::226— table row:max_budget_usd| "Default cost budget in USD per task" | "None (unlimited)", listed under Blueprint per-repository settings:370— "Overrides the per-repo Blueprint default"But
cdk/src/constructs/blueprint.tshas nomaxBudgetUsdprop. It implementsmaxTurns(line 90, written at:251/:343/:360/:377) and simply omits the budget. Verified:grep -n max_budget_usd cdk/src/constructs/blueprint.tsreturns nothing.The type surface makes it look supported, which is why this went unnoticed:
RepoConfig.max_budget_usd?: numberexists (cdk/src/handlers/shared/repo-config.ts:39)BlueprintConfig.max_budget_usd?: numberexists (:74)cli/src/repo-onboard.ts:116preserves an existing value on re-onboardcli/src/repo-display.ts:109,188renders it with ablueprintfield sourceSo every layer can read and carry a per-repo budget, and nothing can write one. The
blueprintfield source inrepo-displayis unreachable for this field.Verified: where it actually can be set
bgagent submit --max-budget <dollars>(cli/src/commands/submit.ts:69), validated 0.01–100 (:137)max_budget_usdinPOST /v1/tasks(USER_GUIDE.md:370)MAX_BUDGET_USDenv (agent/src/config.py:688); ECS strategy forwards the payload value as this env var (ecs-strategy.ts:216). Not read in deployed AgentCore server mode — seeagent/README.md:124agent.maxBudgetUsdUSER_GUIDE.md:231)Why it matters now
With a heavier-token default model landing (#745 — same $5.00/MTok rate, ~1.17x token volume on an identical prompt), the natural operator question is "how do I cap this per repo?" The honest answer today is you can't — only per task, or by choosing a lighter-token model per repo via blueprint
agent.modelId. That is a legitimate answer, but the docs currently imply a budget knob exists, which sends operators looking for a prop that isn't there.Resolution — pick one
Option A (docs-only, smallest). Correct
USER_GUIDE.md:226/:231to state that per-repo budget defaults are not currently supported, and point operators at the per-task flag plus the per-repoagent.modelIdmodel-choice lever. Also correctdocs/design/REPO_ONBOARDING.mdif it repeats the claim.Option B (implement the prop). Add
maxBudgetUsdtoBlueprintProps.agentmirroringmaxTurnsexactly — the write paths atblueprint.ts:251/:343/:360/:377, plus validation matching the CLI's 0.01–100 range so the two boundaries agree. Read path and CLI display already exist, so this is a small, well-patterned change.Recommend B if a per-repo budget is genuinely wanted (the plumbing is already 80% there and the docs already promise it), otherwise A. Either way the docs and code must agree.
Acceptance criteria
USER_GUIDE.md:226/:231corrected, or the prop implemented with tests mirroring themaxTurnscoverage incdk/test/constructs/blueprint.test.tsMAX_BUDGET_USD_MIN/MAX_BUDGET_USD_MAXused bycli/src/commands/submit.ts:137MAX_BUDGET_USDenv is local-batch-only and ignored by deployed AgentCore server modecli/src/repo-display.tsblueprintfield source formax_budget_usdis either reachable (Option B) or documented as unreachable (Option A)mise //docs:syncrun if guides changed;mise run buildgreenRelated
max_budget_usd?" table; will reference whichever resolution this issue takes