{"name":"--max-cost","slug":"max-cost","family":"cli","title":"CLI flags","noun":"CLI flag","description":null,"description_source":"none","described_by":null,"presence":{"first_seen":"2.1.337","removed_in":null,"in_current_build":true,"newest_mined":"2.1.337","builds":1,"mined_builds":176,"first_cited":{"version":"2.1.318","released_at":"2026-11-03 21:55:17","spans":2}},"aliases":[],"entries":[],"entries_total":0,"docs":[{"source":"claude-code","path":"plugin-evals","title":"Test plugins with evals","documented":false},{"source":"claude-code","path":"plugins\/cli-reference","title":"Plugin commands reference","documented":false}],"docs_total":2,"gates":[],"related":[{"name":"--max-budget-usd","slug":"max-budget-usd","description":"Stop the run once estimated spend on API calls reaches this amount (print mode only). Claude Code checks the cap against its [client-side cost estimate](https:\/\/code.claude.com\/docs\/en\/agent-sdk\/cost-tracking.md#estimates-not-billing), which can differ from your bill. Spend from [subagents](https:\/\/code.claude.com\/docs\/en\/sub-agents.md) counts toward the cap. Spend can pass the cap, so [leave headroom](https:\/\/code.claude.com\/docs\/en\/agent-sdk\/agent-loop.md#budget-headroom). When you return to a conversation with `--continue` or `--resume`, totals [restored from earlier runs](https:\/\/code.claude.com\/docs\/en\/agent-sdk\/cost-tracking.md#accumulate-costs-across-multiple-calls) don't count toward it. Once spend reaches the cap, spawning another subagent fails with `Budget limit reached`, and Claude Code stops background subagents that are still running; the cap-enforcement behaviors require Claude Code v2.1.217 or later"},{"name":"--max-cost-usd","slug":"max-cost-usd","description":"Help text for --max-cost-usd now explains its cost ceiling is checked before each run, not per single run"}],"url":"https:\/\/changelogs.core-directive.com\/reference\/cli\/max-cost","family_url":"https:\/\/changelogs.core-directive.com\/reference\/cli.json"}