[{"data":1,"prerenderedAt":1253},["ShallowReactive",2],{"blog-post-codex-reduce-token-usage":3,"related-posts-codex-reduce-token-usage":1230,"decoder-links-codex-reduce-token-usage":1251,"hero-size-codex-reduce-token-usage":1252},{"id":4,"title":5,"author":6,"body":11,"category":1202,"date":1203,"definedTerm":1204,"description":1205,"extension":1206,"featured":1207,"hideToc":1207,"image":1208,"imageAlt":1209,"imageHeight":1210,"imageWidth":1211,"itemList":1204,"lang":1204,"lead":1204,"meta":1212,"navigation":1213,"noindex":1207,"path":1214,"primaryHub":1204,"readingTime":1215,"redirected":1207,"relatedSlugs":1204,"seo":1216,"seoTitle":1217,"stem":1218,"subtitle":1219,"tags":1220,"updatedDate":1203,"__hash__":1229},"blog/blog/codex-reduce-token-usage.md","Codex Token Usage: How to Check It (CLI, IDE, App) and How to Reduce It",{"name":7,"role":8,"avatar":9,"bio":10},"Shabnam Katoch","Growth Head","/img/avatars/shabnam-profile.jpeg","Shabnam leads growth at BetterClaw and has spent the past three years building organic distribution for AI-native products. She writes about no-code agent builders, content strategy, and what it actually takes to grow without an ads budget.",{"type":12,"value":13,"toc":1171},"minimark",[14,40,122,128,134,137,146,151,154,161,166,172,175,189,195,199,209,213,223,227,245,248,280,290,300,304,312,315,318,324,333,337,340,348,354,357,360,367,370,373,377,380,408,464,470,475,481,507,513,521,525,532,534,547,551,557,567,571,581,584,589,619,623,639,642,713,726,732,740,744,754,758,769,805,812,822,826,829,881,895,901,912,916,919,1066,1072,1076,1079,1086,1093,1097,1101,1121,1125,1134,1138,1141,1145,1148,1152,1155,1159,1167],[15,16,17,18,22,23,27,28,31,32,35,36,39],"p",{},"To see ",[19,20,21],"strong",{},"Codex token usage",", type ",[24,25,26],"code",{},"/status"," in the CLI for context left and your limits, ",[24,29,30],{},"/usage weekly"," for token activity, or open Settings > Usage in ChatGPT; session logs sit in ",[24,33,34],{},"~/.codex/sessions",". To use fewer tokens, keep AGENTS.md small (32 KiB cap), lower ",[24,37,38],{},"model_reasoning_effort",", start new chats, compact long ones and filter build output. Checked on Codex CLI 0.172.0.",[41,42,43,56],"table",{},[44,45,46],"thead",{},[47,48,49,53],"tr",{},[50,51,52],"th",{},"If you see this",[50,54,55],{},"Do this",[57,58,59,75,86,98,109],"tbody",{},[47,60,61,65],{},[62,63,64],"td",{},"Context fills up mid-task",[62,66,67,70,71,74],{},[24,68,69],{},"/compact",", or ",[24,72,73],{},"/new"," for the next task",[47,76,77,80],{},[62,78,79],{},"Every chat starts heavy",[62,81,82,83],{},"Trim ",[24,84,85],{},"~/.codex/AGENTS.md",[47,87,88,91],{},[62,89,90],{},"Small tasks eat your allowance",[62,92,93,94,97],{},"Lower reasoning; leave ",[24,95,96],{},"/fast"," off",[47,99,100,103],{},[62,101,102],{},"Build logs flood the chat",[62,104,105,108],{},[24,106,107],{},"rtk init -g --codex","; xcsift for Xcode",[47,110,111,116],{},[62,112,113,115],{},[24,114,26],{}," and the usage page disagree",[62,117,118,119,121],{},"Rerun ",[24,120,26],{}," after a message; trust the usage page",[15,123,124,125,127],{},"Picture this: you ask Codex to fix one failing test. It reads the suite, runs it twice and changes nine lines. Then ",[24,126,26],{}," says a third of your five-hour window is gone.",[15,129,130],{},[131,132,133],"em",{},"Nine lines. Where did it all go?",[15,135,136],{},"Into reading, mostly. A January 2026 study ran Codex on 124 real pull requests, and the average task read about 353,000 input tokens to write 5,700 output tokens (Lulla and colleagues, arXiv 2601.20404).",[15,138,139,140,145],{},"This is the Codex chapter of our roundup of ",[141,142,144],"a",{"href":143},"/blog/skills-that-reduce-token-usage","skills and plugins that reduce token usage",", and it starts with checking: you can't cut what you can't see.",[147,148,150],"h2",{"id":149},"how-to-see-codex-token-usage-cli-ide-and-app","How to see Codex token usage (CLI, IDE and app)",[15,152,153],{},"Four places, and each answers a different question.",[15,155,156],{},[157,158],"img",{"alt":159,"src":160},"Four places to see Codex token usage: /status and /usage in the CLI, /status and Profile in the IDE and desktop app, Settings > Usage on the web, and local session logs read by ccusage","/img/blog/codex-reduce-token-usage-where-to-check.jpg",[162,163,165],"h3",{"id":164},"in-the-cli-status-and-usage","In the CLI: /status and /usage",[15,167,168,169,171],{},"OpenAI's CLI reference describes ",[24,170,26],{}," as: \"Display session configuration and token usage. Confirm the active model, approval policy, writable roots, and remaining context capacity.\" In 0.172.0 the card also shows your 5-hour and weekly limits as percent left, with reset times.",[15,173,174],{},"One catch the reference skips: on a ChatGPT sign-in, the 0.172.0 card hides its \"Token usage\" line, so you get context and limits but no token total (API-key sessions still see it).",[15,176,177,178,181,182,184,185,188],{},"For totals, ",[24,179,180],{},"/usage daily",", ",[24,183,30],{}," or ",[24,186,187],{},"/usage cumulative"," will \"Inspect daily, weekly, or cumulative ChatGPT token activity from inside the TUI\": lifetime and peak tokens, Fast mode use and your most used reasoning level. It needs a ChatGPT sign-in.",[15,190,191,194],{},[24,192,193],{},"/statusline"," pins context, limits or token counters to the footer.",[162,196,198],{"id":197},"in-the-ide-extension-and-desktop-app","In the IDE extension and desktop app",[15,200,201,202,204,205,208],{},"In the VS Code extension and the desktop app, ",[24,203,26],{}," shows \"the chat ID, context usage, and rate limits\". The app adds Profile, with lifetime tokens, peak tokens and token activity, and ",[24,206,207],{},"/usage",", which opens usage and billing settings on a ChatGPT sign-in.",[162,210,212],{"id":211},"on-the-web-dashboard","On the web dashboard",[15,214,215,216,218,219,222],{},"OpenAI's Help Center gives the official route: \"open Settings or your usage dashboard. Check which allowance is exhausted, your credit balance, and any reset time shown.\" In ChatGPT that's Settings > Usage, the page the CLI's ",[24,217,26],{}," card links as ",[24,220,221],{},"chatgpt.com/settings/usage",".",[162,224,226],{"id":225},"from-local-logs","From local logs",[15,228,229,230,233,234,236,237,240,241,244],{},"OpenAI's troubleshooting docs put session transcripts in ",[24,231,232],{},"$CODEX_HOME/sessions"," (default ",[24,235,34],{},") and archived ones in ",[24,238,239],{},"~/.codex/archived_sessions",", as JSONL. In scripts, ",[24,242,243],{},"codex exec --json"," reports input, cached, output and reasoning tokens for each finished turn.",[15,246,247],{},"The quickest reader is ccusage (v20.1.2, 25 November 2026):",[249,250,255],"pre",{"className":251,"code":252,"language":253,"meta":254,"style":254},"language-bash shiki shiki-themes github-light","npx ccusage@latest codex daily     # also: weekly, monthly, session\n","bash","",[24,256,257],{"__ignoreMap":254},[258,259,262,266,270,273,276],"span",{"class":260,"line":261},"line",1,[258,263,265],{"class":264},"s7eDp","npx",[258,267,269],{"class":268},"sYBdl"," ccusage@latest",[258,271,272],{"class":268}," codex",[258,274,275],{"class":268}," daily",[258,277,279],{"class":278},"sAwPA","     # also: weekly, monthly, session\n",[15,281,282,283,286,287,222],{},"Its docs call Codex support \"experimental\" and the cost column an API-price estimate, \"not a ChatGPT credit balance\". The older ",[24,284,285],{},"npx @ccusage/codex@latest"," now runs a deprecated package that tells you to use ",[24,288,289],{},"npx ccusage",[15,291,292,295,296,299],{},[24,293,294],{},"history.persistence"," and ",[24,297,298],{},"history.max_bytes"," don't help here: they only manage Codex's local history file, not what the model reads.",[162,301,303],{"id":302},"why-the-quota-and-the-dashboard-disagree","Why the quota and the dashboard disagree",[15,305,306,307,311],{},"Windows and resets are in our guide to ",[141,308,310],{"href":309},"/blog/chatgpt-codex-shared-usage-limit","Codex usage limits by plan",". OpenAI hasn't documented why the numbers differ, so here is only what it says: \"Usage depends on the model, where the task runs, task complexity, context, reasoning, speed, and tools.\"",[15,313,314],{},"On plans with shared allowances, Codex draws on \"a shared allowance and credit pool\" with ChatGPT Work, ChatGPT for Excel and Workspace Agents, and auto-review safety checks are free on a ChatGPT sign-in. The Help Center also separates \"Codex Local\", which \"covers the CLI, IDE extension, and desktop workflows\", from Codex Cloud for \"delegated cloud tasks\".",[15,316,317],{},"ccusage counts only the session files on your machine, so ChatGPT Work and the rest of that pool never show up in it.",[15,319,320,321,323],{},"The ",[24,322,26],{}," card itself points to the usage page \"for up-to-date information on rate limits and credits\" and flags its limits as possibly stale after 15 minutes. If the gap looks like a counting error, the Help Center says to \"contact Support so we can investigate.\"",[325,326,327],"blockquote",{},[15,328,329,330,332],{},"A percentage of a window and a raw token count are different units. Use the usage page for the meter, and ",[24,331,207],{}," or your logs for the tokens.",[147,334,336],{"id":335},"why-codex-burns-tokens","Why Codex burns tokens",[15,338,339],{},"Five causes, from OpenAI's docs and the 0.172.0 source. They stack.",[15,341,342,343,347],{},"History is re-sent on every turn. Each call carries the chat so far, every file opened and log printed included, and every enabled MCP server, OpenAI says, \"adds more context to your messages\" (see our ",[141,344,346],{"href":345},"/blog/agent-skills-vs-mcp","MCP vs skills breakdown","). About 93% of the study's average input was cache hits, yet output took about 41% of the credits at GPT-6.2 Sol rates: 250 credits per million tokens against 2.5 for cached input (our arithmetic, illustrative).",[15,349,350],{},[157,351],{"alt":352,"src":353},"Codex token usage per task, by count and by credits: cached input dominates the count, output is the biggest share of credits at GPT-6.2 Sol rates","/img/blog/codex-reduce-token-usage-count-vs-credits.jpg",[15,355,356],{},"The AGENTS.md chain rides along. Built once per session, it sits in every turn's context: up to 32 KiB by default, about 8,000 tokens at Codex's estimate of 4 bytes per token.",[15,358,359],{},"Reasoning adds hidden output. In OpenAI's words: \"Higher reasoning effort increases response time and token usage, but it can improve quality for complex work.\"",[15,361,362,363,366],{},"Tool and command output piles up. OpenAI documents ",[24,364,365],{},"tool_output_token_limit"," (\"Token budget for storing individual tool/function outputs in history\") without publishing its default, and the 0.172.0 source trims long outputs from the middle.",[15,368,369],{},"Subagents copy the parent. If you don't set a subagent model or effort, OpenAI's docs say \"the subagent inherits the parent agent's model and reasoning effort\", and subagent workflows \"consume more tokens than comparable single-agent runs\".",[15,371,372],{},"What happened in June 2026: Business Insider reported on 30 June that some users hit Codex limits \"faster than normal\" and that OpenAI set up a Sunday \"warroom\". Codex engineering lead Thibault Sottiaux said auto-review and subagents sometimes ran more often than they should, and the dashboard showed activity that hadn't been charged. OpenAI deployed fixes and \"fully reset\" usage limits for all users.",[147,374,376],{"id":375},"agentsmd-hygiene-global-vs-per-repo","AGENTS.md hygiene: global vs per-repo",[15,378,379],{},"OpenAI's AGENTS.md guide sets the order, and Codex builds the chain \"once per run; in the TUI this usually means once per launched session\":",[381,382,383,395,398,401],"ol",{},[384,385,386,387,390,391,394],"li",{},"Global: in your Codex home (",[24,388,389],{},"~/.codex"," unless you set ",[24,392,393],{},"CODEX_HOME","), \"Codex reads AGENTS.override.md if it exists. Otherwise, Codex reads AGENTS.md\", using \"only the first non-empty file\".",[384,396,397],{},"Project: from the project root, \"typically the Git root\", down to your current directory; \"Codex includes at most one file per directory.\"",[384,399,400],{},"Merge: \"Codex concatenates files from the root down\", so the file closest to you comes last and wins.",[384,402,403,404,407],{},"Cap: Codex \"stops adding files once the combined size reaches the limit defined by ",[24,405,406],{},"project_doc_max_bytes"," (32 KiB by default).\"",[41,409,410,423],{},[44,411,412],{},[47,413,414,417,420],{},[50,415,416],{},"File",[50,418,419],{},"Loads",[50,421,422],{},"Put in it",[57,424,425,437,451],{},[47,426,427,431,434],{},[62,428,429],{},[24,430,85],{},[62,432,433],{},"Every session, in every repo",[62,435,436],{},"A few universal habits",[47,438,439,445,448],{},[62,440,441,442],{},"Repo root ",[24,443,444],{},"AGENTS.md",[62,446,447],{},"Every session in that repo",[62,449,450],{},"Build, test and lint commands; what done means",[47,452,453,458,461],{},[62,454,455],{},[24,456,457],{},"services/payments/AGENTS.md",[62,459,460],{},"Only when you start Codex at or below that folder",[62,462,463],{},"Rules for that one service",[15,465,466,467,222],{},"The global file is the expensive one, because it rides along in every repo. At the cap, OpenAI says to \"Raise the limit or split instructions across nested directories\"; split, since a bigger cap means more context on every turn, and list any other file name in ",[24,468,469],{},"project_doc_fallback_filenames",[325,471,472],{},[15,473,474],{},"Your global AGENTS.md is charged to every chat in every repo. Keep only the rules you'd want enforced in all of them.",[15,476,477,478,480],{},"Don't delete it, though: in the Codex study, a root AGENTS.md cut median output tokens by 16.58% and runtime by 28.64%, with no significant change in input. To see which files loaded, read the Agents.md line in ",[24,479,26],{}," or run OpenAI's audit command:",[249,482,484],{"className":251,"code":483,"language":253,"meta":254,"style":254},"codex --cd subdir --ask-for-approval never \"Show which instruction files are active.\"\n",[24,485,486],{"__ignoreMap":254},[258,487,488,491,495,498,501,504],{"class":260,"line":261},[258,489,490],{"class":264},"codex",[258,492,494],{"class":493},"sYu0t"," --cd",[258,496,497],{"class":268}," subdir",[258,499,500],{"class":493}," --ask-for-approval",[258,502,503],{"class":268}," never",[258,505,506],{"class":268}," \"Show which instruction files are active.\"\n",[15,508,509],{},[157,510],{"alt":511,"src":512},"How Codex builds its AGENTS.md chain: global file, repo root, nested folder, capped at 32 KiB, with the study result","/img/blog/codex-reduce-token-usage-agents-md.jpg",[15,514,515,516,520],{},"For what to put in the file, our ",[141,517,519],{"href":518},"/blog/agents-md-best-practices","AGENTS.md best practices"," guide has a commands-first template.",[147,522,524],{"id":523},"reasoning-effort-model_verbosity-and-plan-mode","Reasoning effort, model_verbosity and plan mode",[15,526,527,528,531],{},"These decide how much Codex thinks and writes per turn, and output is the priciest token on the rate card. Their defaults live in ",[24,529,530],{},"~/.codex/config.toml",", shared by the CLI, IDE extension and desktop app.",[162,533,38],{"id":38},[15,535,536,537,540,541,544,545,222],{},"The config reference lists levels \"such as low, medium, high, xhigh, max, or ultra. Available levels depend on the model and client.\" The 0.172.0 catalog starts GPT-6.2 Sol and Astra at low, so the waste comes from raising effort for one hard bug and never lowering it. Switch with ",[24,538,539],{},"/model --reasoning=low"," (",[24,542,543],{},"/reasoning"," in the IDE and app) and check your habit in ",[24,546,207],{},[162,548,550],{"id":549},"model_verbosity-and-hide_agent_reasoning","model_verbosity and hide_agent_reasoning",[15,552,553,556],{},[24,554,555],{},"model_verbosity"," is an \"Optional GPT-5 Responses API verbosity override; when unset, the selected model/preset default is used.\" The same catalog already sets low verbosity on every model in the picker, so setting it pins a default rather than adding a saving.",[15,558,559,562,563,566],{},[24,560,561],{},"hide_agent_reasoning"," is the common mistake: it will \"Suppress reasoning events in both the TUI and ",[24,564,565],{},"codex exec"," output\", hiding reasoning from you without making the model reason less. It saves no tokens.",[162,568,570],{"id":569},"plan-mode-and-fast-mode","Plan mode and Fast mode",[15,572,573,576,577,580],{},[24,574,575],{},"/plan"," asks Codex \"to propose an execution plan before implementation work starts.\" OpenAI publishes no token figure for it, and it isn't free: the 0.172.0 source runs the Plan preset at medium reasoning (",[24,578,579],{},"plan_mode_reasoning_effort"," changes that) and tells the model to explore the repo first.",[15,582,583],{},"It pays off when it stops a wrong build, and most at the hand-off: choose \"Yes, clear context and implement\" and the build starts in a fresh chat with only the plan.",[15,585,586,588],{},[24,587,96],{}," buys speed, not savings: OpenAI's pricing page says Fast uses included usage at twice the Standard rate on GPT-6.2 models. A lean default:",[249,590,594],{"className":591,"code":592,"language":593,"meta":254,"style":254},"language-toml shiki shiki-themes github-light","# ~/.codex/config.toml\nmodel_reasoning_effort = \"low\"          # raise per task: /model --reasoning=high\nplan_mode_reasoning_effort = \"medium\"   # the built-in Plan default, made explicit\nmodel_verbosity = \"low\"                 # already the default on every listed model\n","toml",[24,595,596,601,607,613],{"__ignoreMap":254},[258,597,598],{"class":260,"line":261},[258,599,600],{},"# ~/.codex/config.toml\n",[258,602,604],{"class":260,"line":603},2,[258,605,606],{},"model_reasoning_effort = \"low\"          # raise per task: /model --reasoning=high\n",[258,608,610],{"class":260,"line":609},3,[258,611,612],{},"plan_mode_reasoning_effort = \"medium\"   # the built-in Plan default, made explicit\n",[258,614,616],{"class":260,"line":615},4,[258,617,618],{},"model_verbosity = \"low\"                 # already the default on every listed model\n",[147,620,622],{"id":621},"compaction-compact-new-and-the-auto-settings","Compaction: /compact, /new and the auto settings",[15,624,625,627,628,630,631,634,635,638],{},[24,626,69],{}," will \"Summarize the visible chat to free tokens\", ",[24,629,73],{}," will \"Reset the chat context without leaving the CLI\", and ",[24,632,633],{},"/clear"," does the same after clearing the terminal. ",[24,636,637],{},"/recap"," writes a summary for you and frees nothing: \"Use /compact when you want to free context space.\"",[15,640,641],{},"If Codex repeatedly shows \"Context automatically compacted\" without making progress, the Help Center says to \"stop the affected task and start a new Codex chat with a short summary of your goal and the work already completed.\" A new chat \"does not reset your usage limits\", though.",[41,643,644,654],{},[44,645,646],{},[47,647,648,651],{},[50,649,650],{},"Key",[50,652,653],{},"What OpenAI's config reference says",[57,655,656,666,676,693,703],{},[47,657,658,663],{},[62,659,660],{},[24,661,662],{},"model_context_window",[62,664,665],{},"\"Context window tokens available to the active model.\"",[47,667,668,673],{},[62,669,670],{},[24,671,672],{},"model_auto_compact_token_limit",[62,674,675],{},"\"Token threshold that triggers automatic history compaction (unset uses model defaults).\"",[47,677,678,683],{},[62,679,680],{},[24,681,682],{},"model_auto_compact_token_limit_scope",[62,684,685,688,689,692],{},[24,686,687],{},"total"," (default) or ",[24,690,691],{},"body_after_prefix",", which counts \"only growth after the carried compaction-window prefix\".",[47,694,695,700],{},[62,696,697],{},[24,698,699],{},"model_post_turn_compact_threshold_percent",[62,701,702],{},"Compacts \"after a final response when active context reaches this percentage of the usable context window\"; omit or set 0 to turn it off.",[47,704,705,710],{},[62,706,707],{},[24,708,709],{},"compact_prompt",[62,711,712],{},"\"Inline override for the history compaction prompt.\"",[15,714,715,716,718,719,295,722,725],{},"OpenAI doesn't publish the default numbers. For long chats, a lower ",[24,717,672],{}," compacts sooner, and the ",[24,720,721],{},"PreCompact",[24,723,724],{},"PostCompact"," hooks run your own script around each compaction.",[15,727,728,729,731],{},"One catch from the 0.172.0 source: with OpenAI as the provider, compaction runs remotely, and ",[24,730,709],{}," is only read when Codex compacts locally, so there it has no effect.",[15,733,734,735,739],{},"Running Claude Code too? Our ",[141,736,738],{"href":737},"/blog/reduce-claude-code-token-usage","guide to reducing Claude Code token usage"," covers its version of these settings.",[147,741,743],{"id":742},"filter-command-output-rtk-and-xcsift","Filter command output: RTK and xcsift",[15,745,746,747,749,750,753],{},"A failing build lands in history and stays until the chat compacts. The built-in fix is a lower ",[24,748,365],{},", or per MCP tool ",[24,751,752],{},"mcp_servers.\u003Cid>.tools.\u003Ctool>.output_token_limit","; two tools go further and filter before Codex sees anything.",[162,755,757],{"id":756},"rtk-rtk-init-g-codex","RTK: rtk init -g --codex",[15,759,760,761,764,765,768],{},"RTK (rtk-ai/rtk, v1.2.1, 19 November 2026) rewrites common commands so they print compact output: ",[24,762,763],{},"git status"," becomes ",[24,766,767],{},"rtk git status",", and a test run shows failures instead of every pass.",[249,770,772],{"className":251,"code":771,"language":253,"meta":254,"style":254},"brew install rtk       # or: winget install rtk-ai.rtk\nrtk init -g --codex    # global hook in $CODEX_HOME/hooks.json (default ~/.codex)\n",[24,773,774,788],{"__ignoreMap":254},[258,775,776,779,782,785],{"class":260,"line":261},[258,777,778],{"class":264},"brew",[258,780,781],{"class":268}," install",[258,783,784],{"class":268}," rtk",[258,786,787],{"class":278},"       # or: winget install rtk-ai.rtk\n",[258,789,790,793,796,799,802],{"class":260,"line":603},[258,791,792],{"class":264},"rtk",[258,794,795],{"class":268}," init",[258,797,798],{"class":493}," -g",[258,800,801],{"class":493}," --codex",[258,803,804],{"class":278},"    # global hook in $CODEX_HOME/hooks.json (default ~/.codex)\n",[15,806,807,808,811],{},"Restart Codex and trust the hook in ",[24,809,810],{},"/hooks","; Codex skips new hooks until you do. In Codex, RTK only rewrites commands before they run, and its notes warn that Codex's safety classifier may ask approval for safe wrapped commands.",[15,813,814,815,817,818,821],{},"RTK claims \"up to 90% less command output\" (author-claimed), with its own caveat: \"a 90% cut in command output is not a 90% cut in cost.\" Quesma's independent test of RTK 0.45.0 (on Claude Code and OpenCode, not Codex) found costs fell 5% on one agent and rose 5% on the other, so judge it by ",[24,816,207],{},"; ",[24,819,820],{},"rtk gain"," is RTK's own estimate.",[162,823,825],{"id":824},"xcsift-for-xcode-builds","xcsift for Xcode builds",[15,827,828],{},"xcsift (ldomaradzki/xcsift, v1.7.5, 11 November 2026, MIT licence) \"transforms verbose Xcode build output into concise, structured formats that coding agents and LLMs can efficiently parse and act upon.\" Its TOON format claims \"30-60% fewer tokens\" than its default JSON (author-claimed).",[249,830,832],{"className":251,"code":831,"language":253,"meta":254,"style":254},"brew install xcsift\nxcsift install-codex                     # writes ~/.codex/skills/xcsift/SKILL.md\nxcodebuild build 2>&1 | xcsift -f toon   # the form the skill tells Codex to use\n",[24,833,834,843,854],{"__ignoreMap":254},[258,835,836,838,840],{"class":260,"line":261},[258,837,778],{"class":264},[258,839,781],{"class":268},[258,841,842],{"class":268}," xcsift\n",[258,844,845,848,851],{"class":260,"line":603},[258,846,847],{"class":264},"xcsift",[258,849,850],{"class":268}," install-codex",[258,852,853],{"class":278},"                     # writes ~/.codex/skills/xcsift/SKILL.md\n",[258,855,856,859,862,866,869,872,875,878],{"class":260,"line":609},[258,857,858],{"class":264},"xcodebuild",[258,860,861],{"class":268}," build",[258,863,865],{"class":864},"sD7c4"," 2>&1",[258,867,868],{"class":864}," |",[258,870,871],{"class":264}," xcsift",[258,873,874],{"class":493}," -f",[258,876,877],{"class":268}," toon",[258,879,880],{"class":278},"   # the form the skill tells Codex to use\n",[15,882,883,884,887,888,891,892,894],{},"It's a skill, not a hook, so it works when the model follows it. Codex 0.172.0 still reads ",[24,885,886],{},"~/.codex/skills"," but marks that folder deprecated (OpenAI's docs list ",[24,889,890],{},"~/.agents/skills","). RTK also filters ",[24,893,858],{},", so pick one tool per command.",[15,896,897],{},[157,898],{"alt":899,"src":900},"Filter output before Codex reads it: RTK rewrites commands through a hook, xcsift is a skill that pipes Xcode builds into structured output","/img/blog/codex-reduce-token-usage-output-filters.jpg",[15,902,903,904,907,908,222],{},"For shorter replies rather than shorter logs, Caveman runs in Codex too (",[24,905,906],{},"$caveman","); see our ",[141,909,911],{"href":910},"/blog/caveman-skill-claude-code","Caveman skill guide",[147,913,915],{"id":914},"_9-fixes-for-codex-token-usage-ranked","9 fixes for Codex token usage, ranked",[15,917,918],{},"The whole post in one table, biggest cut first, in our judgement.",[41,920,921,934],{},[44,922,923],{},[47,924,925,928,931],{},[50,926,927],{},"#",[50,929,930],{},"Fix",[50,932,933],{},"How",[57,935,936,951,967,978,1001,1015,1028,1039,1052],{},[47,937,938,941,944],{},[62,939,940],{},"1",[62,942,943],{},"One chat per task",[62,945,946,184,948,950],{},[24,947,73],{},[24,949,633],{}," when the task changes; history is re-sent every turn.",[47,952,953,956,959],{},[62,954,955],{},"2",[62,957,958],{},"Lower reasoning for routine edits",[62,960,961,963,964,966],{},[24,962,539],{}," (CLI) or ",[24,965,543],{}," (IDE, app); raise it for hard tasks only.",[47,968,969,972,975],{},[62,970,971],{},"3",[62,973,974],{},"Trim AGENTS.md",[62,976,977],{},"Universal rules global, repo rules in the repo; split by folder, don't raise the cap.",[47,979,980,983,986],{},[62,981,982],{},"4",[62,984,985],{},"Switch off idle MCP servers",[62,987,988,989,992,993,996,997,1000],{},"Check ",[24,990,991],{},"/mcp",", then ",[24,994,995],{},"enabled = false"," or an ",[24,998,999],{},"enabled_tools"," allow list.",[47,1002,1003,1006,1009],{},[62,1004,1005],{},"5",[62,1007,1008],{},"Compact before long runs",[62,1010,1011,70,1013,222],{},[24,1012,69],{},[24,1014,699],{},[47,1016,1017,1020,1023],{},[62,1018,1019],{},"6",[62,1021,1022],{},"Filter command output",[62,1024,1025,1026,222],{},"RTK, xcsift for Xcode, or a lower ",[24,1027,365],{},[47,1029,1030,1033,1036],{},[62,1031,1032],{},"7",[62,1034,1035],{},"Attach less",[62,1037,1038],{},"\"Provide only relevant files\", as OpenAI's pricing page puts it.",[47,1040,1041,1044,1047],{},[62,1042,1043],{},"8",[62,1045,1046],{},"Plan, then hand off clean",[62,1048,1049,1051],{},[24,1050,575],{},", then \"Yes, clear context and implement\".",[47,1053,1054,1057,1060],{},[62,1055,1056],{},"9",[62,1058,1059],{},"Pin model_verbosity",[62,1061,1062,1065],{},[24,1063,1064],{},"model_verbosity = \"low\"",", already the default on current models.",[15,1067,1068,1069,1071],{},"The cheapest token is the one Codex never has to read again. Check first, cut second, and let ",[24,1070,207],{}," tell you whether it worked.",[147,1073,1075],{"id":1074},"keep-your-always-on-jobs-off-your-codex-allowance","Keep your always-on jobs off your Codex allowance",[15,1077,1078],{},"Codex is at its best on code, with you watching. Recurring jobs like a morning report, inbox triage or a weekly digest don't need your coding allowance.",[15,1080,1081,1082],{},"That's what BetterClaw is for: a managed agent platform where those jobs run on a schedule, connected to 500+ apps. The free plan gives you 1 agent, 100 credits a month and 3 connectors, with no expiry. ",[141,1083,1085],{"href":1084},"/free-plan","Start free",[15,1087,1088,1089],{},"Need more runs than that? Starter is $19 a month with 2,000 credits. ",[141,1090,1092],{"href":1091},"/pricing","See plans and pricing",[147,1094,1096],{"id":1095},"frequently-asked-questions","Frequently Asked Questions",[162,1098,1100],{"id":1099},"how-do-you-see-your-codex-token-usage","How do you see your Codex token usage?",[15,1102,1103,1104,1106,1107,181,1110,1113,1114,1116,1117,1120],{},"Type ",[24,1105,30],{}," (or ",[24,1108,1109],{},"daily",[24,1111,1112],{},"cumulative",") in the Codex CLI for token activity and ",[24,1115,26],{}," for context and limits. The desktop app shows lifetime and peak tokens under Profile, ChatGPT shows limits under Settings > Usage, and ",[24,1118,1119],{},"npx ccusage@latest codex daily"," totals your local logs.",[162,1122,1124],{"id":1123},"where-can-i-find-the-official-codex-usage-page","Where can I find the official Codex usage page?",[15,1126,1127,1128,1130,1131,1133],{},"In ChatGPT, open Settings > Usage (",[24,1129,221],{},"), the page the Codex CLI's ",[24,1132,26],{}," card links to. OpenAI's Help Center article \"Using Codex with your ChatGPT plan\" says to check there which allowance is exhausted, your credit balance and any reset time.",[162,1135,1137],{"id":1136},"how-does-codex-token-usage-work","How does Codex token usage work?",[15,1139,1140],{},"Each call re-sends the chat so far, and the model adds output and hidden reasoning. OpenAI says usage depends on the model, where the task runs, task complexity, context, reasoning, speed and tools; on a ChatGPT plan it counts against 5-hour and weekly windows, pooled with ChatGPT Work on plans with shared allowances.",[162,1142,1144],{"id":1143},"why-is-codex-using-so-many-tokens-suddenly","Why is Codex using so many tokens suddenly?",[15,1146,1147],{},"Usually a long chat, higher reasoning, a growing AGENTS.md, more MCP servers or subagents. In late June 2026 it was OpenAI's side: Business Insider reported that auto-review and subagents sometimes ran more often than they should, and OpenAI deployed fixes and reset limits for all users.",[162,1149,1151],{"id":1150},"does-plan-mode-use-more-tokens","Does plan mode use more tokens?",[15,1153,1154],{},"It can, up front: in the 0.172.0 source, plan mode explores the repo first and runs at medium reasoning. OpenAI publishes no token figure, and it pays off when it prevents a wrong build, most of all if you pick \"Yes, clear context and implement\".",[162,1156,1158],{"id":1157},"does-codex-or-claude-code-use-fewer-tokens","Does Codex or Claude Code use fewer tokens?",[15,1160,1161,1162,1166],{},"We know of no independent, current benchmark that runs both on the same tasks. Run the same task in each and compare their own usage views; our ",[141,1163,1165],{"href":1164},"/blog/codex-vs-claude-code","Codex vs Claude Code"," comparison covers plans and limits.",[1168,1169,1170],"style",{},"html pre.shiki code .s7eDp, html code.shiki .s7eDp{--shiki-default:#6F42C1}html pre.shiki code .sYBdl, html code.shiki .sYBdl{--shiki-default:#032F62}html pre.shiki code .sAwPA, html code.shiki .sAwPA{--shiki-default:#6A737D}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html pre.shiki code .sYu0t, html code.shiki .sYu0t{--shiki-default:#005CC5}html pre.shiki code .sD7c4, html code.shiki .sD7c4{--shiki-default:#D73A49}",{"title":254,"searchDepth":603,"depth":603,"links":1172},[1173,1180,1181,1182,1187,1188,1192,1193,1194],{"id":149,"depth":603,"text":150,"children":1174},[1175,1176,1177,1178,1179],{"id":164,"depth":609,"text":165},{"id":197,"depth":609,"text":198},{"id":211,"depth":609,"text":212},{"id":225,"depth":609,"text":226},{"id":302,"depth":609,"text":303},{"id":335,"depth":603,"text":336},{"id":375,"depth":603,"text":376},{"id":523,"depth":603,"text":524,"children":1183},[1184,1185,1186],{"id":38,"depth":609,"text":38},{"id":549,"depth":609,"text":550},{"id":569,"depth":609,"text":570},{"id":621,"depth":603,"text":622},{"id":742,"depth":603,"text":743,"children":1189},[1190,1191],{"id":756,"depth":609,"text":757},{"id":824,"depth":609,"text":825},{"id":914,"depth":603,"text":915},{"id":1074,"depth":603,"text":1075},{"id":1095,"depth":603,"text":1096,"children":1195},[1196,1197,1198,1199,1200,1201],{"id":1099,"depth":609,"text":1100},{"id":1123,"depth":609,"text":1124},{"id":1136,"depth":609,"text":1137},{"id":1143,"depth":609,"text":1144},{"id":1150,"depth":609,"text":1151},{"id":1157,"depth":609,"text":1158},"Guides","2026-11-27",null,"See Codex token usage in /status, /usage, the dashboard and ccusage, then cut it: AGENTS.md, reasoning effort, model_verbosity, compaction, RTK and xcsift.","md",false,"/img/blog/codex-reduce-token-usage.jpg","Codex token usage in the CLI: a /status card with token usage, context window and limits, next to /usage and ccusage",512,1024,{},true,"/blog/codex-reduce-token-usage","14 min read",{"title":5,"description":1205},"Codex Token Usage: How to Check It and 9 Ways to Cut It","blog/codex-reduce-token-usage","Four places to see what Codex spends, five things that drive it and nine fixes ranked by how much they cut, checked against Codex CLI 0.172.0.",[1221,1222,1223,1224,1225,1226,1227,1228],"codex token usage","how to check codex token usage","reduce codex token usage","why does codex burn tokens","codex /status","codex /usage","codex usage dashboard","ccusage codex","dVKoX9glI_rtD72OBECTqeLJHhTf9VYLqmG0u0WfkDc",[1231,1238,1245],{"stem":1232,"title":1233,"description":1234,"date":1203,"image":1235,"category":1202,"redirected":1207,"author":1236,"readingTime":1237},"blog/cursor-token-usage","Cursor Token Usage: How to Check It, Why It Spikes, and How to Reduce It","Where to see Cursor token usage on X Subscription and legacy plans, what cache-read tokens and the context meter mean, why usage spikes, and how to cut it.","/img/blog/cursor-token-usage.jpg",{"name":7,"role":8,"avatar":9,"bio":10},"13 min read",{"stem":1239,"title":1240,"description":1241,"date":1203,"image":1242,"category":1202,"redirected":1207,"author":1243,"readingTime":1244},"blog/caveman-skill-claude-code","The Caveman Skill for Claude Code: Install, Modes, and What the Tests Actually Show (v4.2)","How to install the Caveman skill in Claude Code, Codex, Cursor, Hermes and OpenClaw, switch modes or turn it off, and what JetBrains and others measured.","/img/blog/caveman-skill-claude-code.jpg",{"name":7,"role":8,"avatar":9,"bio":10},"18 min read",{"stem":1246,"title":1247,"description":1248,"date":1203,"image":1249,"category":1202,"redirected":1207,"author":1250,"readingTime":1215},"blog/hermes-agent-token-usage","Hermes Agent Token Usage: How to Check It, When It Compresses, and 8 Ways to Cut It","How to see Hermes Agent token usage with /usage, /context and /insights, how compression and prompt caching work in v0.23, and eight fixes that cut spend.","/img/blog/hermes-agent-token-usage.jpg",{"name":7,"role":8,"avatar":9,"bio":10},[],{"width":1211,"height":1210},1795783797156]