Answer: You set an estimated cost limit in USD before starting the scan using --max-cost, but the limit is an estimate, not a hard spending cap, so requests already in progress can finish above it. If a deep scan reaches the limit after aggregating completed worker results, the CLI can save a completed report with a budget warning, returning 0, or 1 if findings meet the configured severity threshold; if it can't produce a valid completed result, it returns 2 and preserves any available output. Status: Confirmed Entry: tool/codex/pricing-and-limits/scan-cost-limits Revision: 2 Digest: sha256:d1fdeb5aefcc34d2 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:53:10Z Last changed: 2026-11-19T13:32:00Z (over-limit behavior: — → Requests already in progress can finish above it) Last verified: 2026-11-20T13:41:43Z Next check: 2026-11-21T13:41:43Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of cost limit flag | --max-cost 5 | [1] | 2026-11-20 limit nature | an estimate, not a hard spending cap | [1] | 2026-11-20 over-limit behavior | Requests already in progress can finish above it | [1] | 2026-11-20 return code on completed report | 0 | [1] | 2026-11-20 return code on severity threshold | 1 | [1] | 2026-11-20 return code on invalid result | 2 | [1] | 2026-11-20 Sources: [1] OpenAI. "Codex Security CLI FAQ". https://learn.chatgpt.com/docs/security/cli/faq.md Role: primary. Accessed: 2026-11-20T13:41:43Z Quote: "npx @openai/codex-security scan . --max-cost 5" (Supports: cost limit flag) Quote: "The limit is an estimate, not a hard spending cap." (Supports: limit nature) Quote: "Requests already in progress can finish above it." (Supports: over-limit behavior) Quote: "It returns `0`, or `1` if findings meet the configured severity threshold." (Supports: return code on completed report, return code on severity threshold) Quote: "it returns `2` and preserves any available output." (Supports: return code on invalid result) Snapshot SHA-256: 5e5a9a41f3ff72e7e8c81bebb44325e8de0f2d9f121c768eb9ce4ca932719092 (captured 2026-11-17T14:06:48Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-18T13:35:27Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T13:41:43Z. No independent second source is configured for this entry Last successful check: 2026-11-20T13:41:43Z Last attempt: 2026-11-20T13:41:43Z Notes and limitations: Extracted automatically from a single official source (section "How do scan cost limits work"). Related: https://latestn.com/tool/codex/pricing-and-limits/tokens-and-credits What are tokens and credits in Codex and ChatGPT, and what are the token rates? https://latestn.com/tool/codex/pricing-and-limits/usage-limits-by-plan What are the usage limits for my ChatGPT or Codex plan? https://latestn.com/tool/codex/pricing-and-limits/use-cases-credit-spend How do I see which use cases and tasks consume credits in ChatGPT Work and Codex? https://latestn.com/tool/codex/pricing-and-limits/cloud-scan-billing How are Daybreak Defense Factory cloud scans billed? https://latestn.com/tool/codex/pricing-and-limits/fast-mode-billing How is Fast mode billed in Codex? https://latestn.com/tool/codex/pricing-and-limits/hit-usage-limits What happens when I hit my Codex or ChatGPT usage limits? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-19T13:32:00Z | changed | over-limit behavior: — → Requests already in progress can finish above it | [1] 2026-11-19T13:32:00Z | changed | limit nature: estimate, not a hard spending cap → an estimate, not a hard spending cap | [1] 2026-11-18T13:35:27Z | recovered | Check succeeded again | — 2026-11-17T14:06:49Z | check-failed | Extraction did not pass verification: answer contains ` if findings meet the configured severity threshold; if it can't produce a valid completed result, it returns `, which does not appear in the source | — 2026-11-13T03:53:10Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/codex/pricing-and-limits/scan-cost-limits/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/codex/pricing-and-limits/scan-cost-limits POST: https://latestn.com/dispute/tool/codex/pricing-and-limits/scan-cost-limits with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/codex/pricing-and-limits/scan-cost-limits?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do scan cost limits work in Codex Security CLI? Revision 2, last verified 2026-11-20T13:41:43Z. https://latestn.com/tool/codex/pricing-and-limits/scan-cost-limits (accessed 2026-11-21T09:57:14Z). @misc{LatestN_tool_codex_pricing_and_limits_scan_cost_limits_r2, title = {How do scan cost limits work in Codex Security CLI?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/codex/pricing-and-limits/scan-cost-limits}}, note = {Revision 2; digest sha256:d1fdeb5aefcc34d2; last verified 2026-11-20T13:41:43Z; accessed 2026-11-21T09:57:14Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/codex/pricing-and-limits/scan-cost-limits