How are people managing context in Codex?

I use PrimeRadiant’s Superpowers a LOT with Codex. I really like the structure it adds to the workflow and at this point I use it on most of my larger coding tasks.

One thing I’ve noticed, though, is that my context window can fill up pretty quickly on longer sessions.

I don’t know how much of that is actually Superpowers, how much is just the size of the work I’m throwing at Codex, or how much comes from the number of skills and agents involved. That’s kind of what I’m trying to figure out.

OpenAI recently published an article about building longer-running agent workflows, and one part that caught my attention was their discussion about long-running tasks filling the context window as the agent works with tools, skills, and accumulated information.

That immediately made me think about Superpowers.

So I’m curious if there are other people here using it heavily:

How do you manage your context window?

Do you tend to start new Codex threads between different stages of the work?

Have you changed anything about how you use Superpowers to keep context usage under control?

Are there certain parts of Superpowers you only use when a task is big enough to justify them?

Or do you mostly just let Codex compact the conversation and keep going?

I’d also be really interested if anyone has ever compared context usage with and without Superpowers enabled.

I’m not trying to squeeze every possible token out of Codex. If Superpowers uses more context but helps Codex make fewer mistakes and keeps larger tasks organized, that’s a perfectly reasonable tradeoff to me.

I’m mostly curious whether other people have run into the same thing and what they’ve found works well.

OpenAI article that got me thinking about this:

Once compacting begins, I consider a session lost. I start a new one.

Agents.md files are short. Readmes are compact. The models’ verbosity is counterproductive here. A lot of human time is spent separating words from information. The current generation of models (Sol) makes this worse, they want to over specify trivial things.

If a module implementation is running into compaction, the module’s probably getting too big.

Compact and coherent interfaces are critical. Requirements and design docs composed by AI are rarely useful.

Thanks for the insight. I appreciate it!

I have been wondering recently if all the ceremony is really worth it and does it actually pay off.

I think I’m going to give it a try without all the bells and whistles for a couple of days to feel out how context window consumption reacts.

Regarding starting a new session, do you branch from the chat you’re currently in to a new one, or start a completely fresh chat when you’re nearing compaction?

Every module’s a clean session. If I rebuild a module it’s a clean session. The compaction is just an indicator that things might be going off the rails.

So no, no branches, no history, no nothing. I have some agents files I recycle.

That makes sense. I feel like I bought into the idea that more tools was better without testing A/B enough to really make that decision insightfully.

I literally just turned off a bunch of what I was using before, and already see a context consumption difference and (I did expect this) an increase in speed.

One thing I’m noticing, and I’m still not sure what’s causing this, is an almost immediate jump to around 39K tokens upon the start of a new chat. Any idea where this may be coming from or how I could do some investigating?

dunno. :thinking: do you have some mcp thing connected?

i imagine it depends a lot on your environment and where you start codex from. I start the cli/extension sessions directly from the appropriate directory. If you start it from a superdirectory you might have a lot more potential stuff that might get loaded.

but this is just an armchair analysis on my end.

Yeah I’m going to have to do some poking around. I have Linear as a plugin which I use for issue tracking, but that’s an on demand use I believe. The only actual MCPs I see are codex_app and node_repl.

do report back what you find! I imagine it’s super valuable for the community!

Will do! Once I get some actual, empirical evidence, I’ll be sure to share.

I’ve done some basic comparisons with Codex CLI and Dektop. Even with a prompt of “reply ok, make no tool calls and view no files.” I’m still seeing between 18.7k - 27.7k consumed immediately, with Desktop being the more hungry of the two surfaces. This was done with the same project in Codex, on multiple runs with very minor deviation between the initial token amount consumed. I’m working on a more controlled experiement with visual output for a better breakdown of where the token consumption may be coming from.

# Codex Desktop vs CLI: a small context-usage comparison across Astra, Sol, and Luna

I collected 18 context readings across Codex Desktop and CLI: three readings per model per surface, all at Medium reasoning. In this sample, Desktop reported roughly **8,100–9,800 more tokens used on average** than CLI.

There was also a separate discrepancy: **all nine CLI readings had a displayed “% left” that did not agree with the accompanying used-token count and 258K capacity**. That makes the token counts and percentages worth discussing separately.

## Setup and collection protocol

- Models: `gpt-6-astra`, `gpt-5.6-sol`, and `gpt-5.6-luna`, all at Medium.
- Codex Desktop: `26.908.40834`. Codex CLI: `0.154.0`.
- I recorded the project, instructions, skills, and tools as matched across Desktop and CLI.
- Dataset labeled September 13, 2026; three readings per surface per model.

The collection protocol called for a fresh task/session for each reading, followed by this control prompt:

```text
Reply with exactly OK. Do not inspect files or use tools.
```

The next step was to record the context line from `/status` immediately after the response. The saved data contains the readings and matching-settings confirmation, but does not independently document each run’s execution or the operating system.

## Results: reported tokens used

Model Desktop mean CLI mean, approximate Desktop minus CLI, approximate
Astra 29,459.33 19,700 +9,759
Sol 30,878 22,767 +8,111
Luna 28,835.67 19,300 +9,536

CLI counts were displayed in rounded K notation. Averages and differences calculated from those values remain approximate; extra digits in a calculation do not add measurement precision. All readings displayed a capacity of `258K`.

Here are the individual readings, in collection order. Each entry is **tokens used / displayed percentage left**:

Model Desktop readings CLI readings
Astra 29,458 / 89%; 29,462 / 89%; 29,458 / 89% 19.7K / 97%; 19.7K / 97%; 19.7K / 97%
Sol 30,874 / 88%; 30,880 / 88%; 30,880 / 88% 25.5K / 95%; 21.4K / 96%; 21.4K / 96%
Luna 28,837 / 89%; 28,837 / 89%; 28,833 / 89% 19.3K / 97%; 19.3K / 97%; 19.3K / 97%

Desktop varied by only 4–6 tokens within each model’s three readings. Astra and Luna CLI readings were identical at their displayed precision. Sol CLI varied from `21.4K` to `25.5K`, an approximately 4,100-token spread. I retained all three Sol readings in its average.

## The percentage discrepancy

Using `100 × (1 − used / capacity)` with the displayed counts gives:

CLI reading Displayed left Calculated left, approximate
Astra: 19.7K / 258K 97% 92.36%
Sol: 25.5K / 258K 95% 90.12%
Sol: 21.4K / 258K 96% 91.71%
Luna: 19.3K / 258K 97% 92.52%

Our comparison tool flagged every CLI reading because each discrepancy exceeds one percentage point. No Desktop reading crossed that threshold. I preserved the supplied percentages rather than correcting them.

This establishes a mismatch within the recorded values. It does not establish whether the cause is display semantics, a reporting issue, or a collection/transcription issue.

## What I take from this

Desktop reported higher used-token totals for all three models in this small sample. These totals do not identify which instructions, tools, or other content consumed the context, or explain why the surfaces differed. They also do not measure billing, answer quality, or performance.

With only three readings per group, rounded CLI counts, and the percentage discrepancy unresolved, I would treat this as an observation to reproduce—not a universal Desktop overhead figure.

Has anyone reproduced a similar token-count gap with matching settings? And does anyone know whether CLI’s context percentage uses a different basis from the token count and capacity shown beside it?

## Generated charts and evidence

The reports below were generated locally with `codex-context-monitoring compare` from manually collected, sanitized readings. Shared data includes only usage measurements, model/settings, application versions, and a general setup description.

### Astra

Full Astra report: readings, statistics, and warnings

#### Test summary

Real operator\-supplied gpt\-6\-astra Medium context readings\; three per surface\. Percentages preserved as supplied\; CLI percentage discrepancies require follow\-up\.

#### Individual readings

**Desktop**

```text
Context: 89% left (29,458 used / 258K)
Context: 89% left (29,462 used / 258K)
Context: 89% left (29,458 used / 258K)
```

**CLI**

```text
Context window: 97% left (19.7K used / 258K)
Context window: 97% left (19.7K used / 258K)
Context window: 97% left (19.7K used / 258K)
```

K notation in the original readings is rounded, including capacities.

#### Summary statistics

Surface Count Average tokens Minimum tokens Maximum tokens
Desktop 3 29,459.33 29,458 29,462
CLI 3 approximate 19,700 approximate 19,700 approximate 19,700

Desktop average minus CLI average: approximate 9,759 tokens

Fractional token results are rounded to two decimal places for display.

Approximate results use rounded tokens-used input and are shown to whole tokens; calculation does not add measurement precision.

#### Warnings

- CLI reading 1 (input line 17): displayed 97% left; tokens-based 92.36% left (using normalized counts). Difference exceeds one percentage point.
- CLI reading 2 (input line 18): displayed 97% left; tokens-based 92.36% left (using normalized counts). Difference exceeds one percentage point.
- CLI reading 3 (input line 19): displayed 97% left; tokens-based 92.36% left (using normalized counts). Difference exceeds one percentage point.

### Sol

Full Sol report: readings, statistics, and warnings

#### Test summary

Real operator\-supplied gpt\-5\.6\-sol Medium context readings\; three per surface\. Percentages preserved as supplied\; CLI percentage discrepancies require follow\-up\.

#### Individual readings

**Desktop**

```text
Context: 88% left (30,874 used / 258K)
Context: 88% left (30,880 used / 258K)
Context: 88% left (30,880 used / 258K)
```

**CLI**

```text
Context window: 95% left (25.5K used / 258K)
Context window: 96% left (21.4K used / 258K)
Context window: 96% left (21.4K used / 258K)
```

K notation in the original readings is rounded, including capacities.

#### Summary statistics

Surface Count Average tokens Minimum tokens Maximum tokens
Desktop 3 30,878 30,874 30,880
CLI 3 approximate 22,767 approximate 21,400 approximate 25,500

Desktop average minus CLI average: approximate 8,111 tokens

Fractional token results are rounded to two decimal places for display.

Approximate results use rounded tokens-used input and are shown to whole tokens; calculation does not add measurement precision.

#### Warnings

- CLI reading 1 (input line 17): displayed 95% left; tokens-based 90.12% left (using normalized counts). Difference exceeds one percentage point.
- CLI reading 2 (input line 18): displayed 96% left; tokens-based 91.71% left (using normalized counts). Difference exceeds one percentage point.
- CLI reading 3 (input line 19): displayed 96% left; tokens-based 91.71% left (using normalized counts). Difference exceeds one percentage point.

### Luna

Full Luna report: readings, statistics, and warnings

#### Test summary

Real operator\-supplied gpt\-5\.6\-luna Medium context readings\; three per surface\. Percentages preserved as supplied\; CLI percentage discrepancies require follow\-up\.

#### Individual readings

**Desktop**

```text
Context: 89% left (28,837 used / 258K)
Context: 89% left (28,837 used / 258K)
Context: 89% left (28,833 used / 258K)
```

**CLI**

```text
Context window: 97% left (19.3K used / 258K)
Context window: 97% left (19.3K used / 258K)
Context window: 97% left (19.3K used / 258K)
```

K notation in the original readings is rounded, including capacities.

#### Summary statistics

Surface Count Average tokens Minimum tokens Maximum tokens
Desktop 3 28,835.67 28,833 28,837
CLI 3 approximate 19,300 approximate 19,300 approximate 19,300

Desktop average minus CLI average: approximate 9,536 tokens

Fractional token results are rounded to two decimal places for display.

Approximate results use rounded tokens-used input and are shown to whole tokens; calculation does not add measurement precision.

#### Warnings

- CLI reading 1 (input line 17): displayed 97% left; tokens-based 92.52% left (using normalized counts). Difference exceeds one percentage point.
- CLI reading 2 (input line 18): displayed 97% left; tokens-based 92.52% left (using normalized counts). Difference exceeds one percentage point.
- CLI reading 3 (input line 19): displayed 97% left; tokens-based 92.52% left (using normalized counts). Difference exceeds one percentage point.

</detai

I have seen a lot of people do what Diet suggest, changing session all the time. And I tried myself with astonishingly terrible results. I have all my project in one single chat having access to all the files of the project and it gives way better results that changing chat all the time. To me changing chat is like throwing your trained model into a trashcan and starting again with a new intern that gonna miss so many links and habits.

Every single time I tried to change chat it backfired. I only change chat when the software force me to.

For the architecture, I just simply use ChatGPT as the achitect and to redact the prompts for codex. It give extremely accurate context despite my GPT chat having thousand of messages in the thread.

Just so you know, codex has 100% freedom in his folder (in my session). And so to keep all the context we designed a robust workflow with report on every single mission that he can fetch as much as he wants and are shared with ChatGPT for the architecture. He can also freely create .ps1 tools and harness to make sure the modifications create no regression either. He also has some MD and github desktop to track the modifications. Every single tool that can help him keep all the context is always allowed.

Thanks, @T.Maillet! Always great to hear alternate points of view on experience with these sorts of things. I’ve had a mixed bag of results in long running windows, but I feel like that could also be the way that I was managing access, memories, compaction, etc. One thing that I have had success with using the new-chat method @Diet mentioned is for bite-sized piece approaches to feature/requirement development. What I like most about this approach is the ease in reviewing what is produced, which I’ve become much more involved with lately. I don’t end up with unmanageable PRs, and can course correct more easily when the models start going astray of the path I originally intended.

I’ve noticed something similar with longer Codex sessions. I think it’s probably a combination of the task size, tool usage, and accumulated context rather than Superpowers alone.

For larger tasks, I find it helps to break the work into clear stages and start a new thread when moving to a completely different part of the project. Keeping notes or a short summary of the current state also makes it easier to continue without carrying the entire conversation forward.

I’d be interested to see an actual comparison of context usage with Superpowers enabled versus disabled. That would make it much easier to tell how much overhead it really adds.

Maybe a bit of advice if you havent try but since ChatGPT is my architecht, I have codex produce a report at the end of each part of the project which is fed with GPT to correct the course of the modification and further improve the method. It’s like using 2 AI to challenge each other to bring the best of each one :slight_smile:

But yeah anyway all my tasks are managed in subtasks to keep the hand on it. And also I often use the live follow up messages of codex to interviene live when I see something starting to digress. On that end Astra is way worst than Sol. Astra give 5 to 10 times less details on what it does.

P.S.: on that note, I also feed all the details of the live chat that Astra/Sol produce alongside the report to GPT so he has all the context.

Yeah, I’ve found recently that it helps, especially for my mental bandwidth, to use this smaller chunking approach. I may try running the experiment again with Superpowers here soon. Will keep you posted.

I’ve found it works better to keep the context structured instead of putting everything into one huge prompt.

For larger projects, I usually keep the important project rules, architecture notes, and conventions in a dedicated file, then give Codex only the context needed for the current task. Breaking bigger tasks into smaller steps also seems to make the results more consistent.

The main thing is avoiding unnecessary context. More context doesn’t always mean better results it can make it harder for the model to focus on what actually matters.

I came at this from a slightly different direction. I was migrating several long-running custom GPTs into Skills/Plugins, and that eventually pushed me toward a persistent Codex workflow instead of trying to preserve everything inside one chat session.

The path was basically:

OpenAI data export → recover accumulated GPT knowledge → turn those into structured Skills/Plugin packages → use one of those Skills as the operating layer for a persistent Codex project workflow.

In the Codex side, the project now carries durable state in the repo: current goal, architectural decisions, acceptance criteria, open risks, and next step. The root agent handles planning/orchestration, bounded subagents handle implementation, the root verifies results, state gets updated, and Git provides known-good checkpoints.

The important part for me was proving fresh-session recovery. I can end a session, start a new one, and the root can reconstruct where the project left off from the repo rather than relying on chat history.

So I’m treating persistence less as “make the model remember more” and more as externalize the authoritative project state so the workflow can resume cleanly.

For context, I’m a full-time professional photographer, not a software engineer, so the fact that I somehow ended up with durable project state, bounded subagents, and Git checkpoints is mildly ridiculous — but it’s been very practical.