codex - 💡(How to fix) Fix Your system prompt is too big [2 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#19212Fetched 2026-04-24 05:58:41
View on GitHub
Comments
2
Participants
3
Timeline
6
Reactions
0
Timeline (top)
labeled ×3commented ×2closed ×1

Code Example

A reasonable estimate for this session is:

* System instructions: 2k-4k
* Web/browsing policy and source-handling rules: 3k-5k
* Developer instructions for coding behavior/style/workflow: 3k-5k
* Tool schemas and tool descriptions: 2k-4k
* AGENTS.md and environment context: 0.5k-1k
* Your actual message: under 100
RAW_BUFFERClick to expand / collapse

What version of the IDE extension are you using?

26.417.40842

What subscription do you have?

Plus

Which IDE are you using?

VSCode/.Cursor (same)

What platform is your computer?

No response

What issue are you seeing?

I am trying Codex (after years of using Cursor and months of Claude Code) and the system prompt looks bloated.

Asking a simple question "what is 2+2" consumes ~13k (13 thousand!) tokens. I don't have any skills, custom prompts, MCPs, my project's agents.md is 30 lines (500 tokens).

I interrogated Codex to tell me how big the system instructions are and it says:

A reasonable estimate for this session is:

* System instructions: 2k-4k
* Web/browsing policy and source-handling rules: 3k-5k
* Developer instructions for coding behavior/style/workflow: 3k-5k
* Tool schemas and tool descriptions: 2k-4k
* AGENTS.md and environment context: 0.5k-1k
* Your actual message: under 100

Pardon my French, this is nuts.

What steps can reproduce the bug?

Ask "What is 2+2" in VScode extension, see this

<img width="199" height="153" alt="Image" src="https://github.com/user-attachments/assets/705af6f7-7556-42e7-8136-9f5b2efa6c21" />

What is the expected behavior?

No response

Additional information

No response

extent analysis

TL;DR

The issue may be resolved by optimizing or reducing the system instructions and policies in the Codex configuration to decrease the token consumption.

Guidance

  • Investigate the system instructions, web/browsing policy, and source-handling rules to identify areas for reduction, as these are estimated to consume 3k-5k tokens each.
  • Review the developer instructions for coding behavior/style/workflow and tool schemas to see if they can be optimized or reduced.
  • Consider reaching out to the Codex support team for guidance on how to reduce the system instructions and policies, as the estimated token consumption seems excessive.
  • Verify the token consumption by asking different questions and checking if the token usage changes.

Example

No code snippet is provided as the issue is related to configuration and token consumption.

Notes

The issue seems to be specific to the Codex configuration and the VSCode extension. The exact solution may depend on the specific configuration and policies in place.

Recommendation

Apply workaround: Optimize the system instructions and policies to reduce token consumption, as the current estimated consumption seems excessive and is causing issues with simple queries.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix Your system prompt is too big [2 comments, 3 participants]