The useful question is not which command makes the next context meter smaller. It is which workflow completes your task with less unnecessary work.
OpenAI documents /compact as a conversation summary operation and /new as a fresh chat operation.
See the official command reference.
Choose based on the next task
| Situation | Starting choice | Reason |
|---|---|---|
| Continue a complex debugging task | /compact |
Earlier findings still matter |
| Start an unrelated feature | /new |
The earlier conversation has little value |
| Continue a short, useful conversation | Keep the current chat | Neither operation may be necessary |
| Restart after a confused investigation | /new with a brief |
Preserve confirmed facts without every failed approach |
| Preserve an exact error or requirement | Save it before either command | A summary may omit exact details |
This table gives a decision rule, not a measured savings ranking. The best choice depends on how much useful information the agent would need to recover.
What compaction preserves
Compaction replaces a longer conversation with a shorter summary. That summary can retain the objective, progress, and important constraints. It is not a guarantee that every file excerpt, error message, or decision remains verbatim.
Before a difficult continuation, keep exact requirements in an appropriate project file. For example, a reproduction command belongs with the debugging notes, and an acceptance test belongs in the repository. Check that the agent still understands those requirements after compaction.
What a new chat changes
A new chat removes the previous conversation as the working transcript. It does not mean the next model request contains zero tokens. The agent still needs its instructions, your new request, and any content it retrieves.
It also does not undo changes on disk. Tell the agent which edits already exist and which files it may change. Keep unrelated work protected.
Use this short handoff when the next chat continues related work:
Goal: Fix session expiry handling.
Confirmed cause: The dashboard accepts an expired cached session.
Changed files: src/auth/session.ts.
Remaining work: Add coverage for refresh failure.
Validation: Run the existing session test target.
Constraint: Preserve unrelated dashboard edits.
This example illustrates a brief. It is not a transcript from a measured run.
Why smaller context does not always mean lower cost
Starting again can cause repeated searches, reads, and tests. Compaction can require a summarization request before the task continues. Both workflows can then differ in correctness and retries.
Caching adds another distinction. OpenAI’s prompt caching documentation describes reuse of matching prompt prefixes. Cached input and fresh input can have different prices. A smaller token total alone does not establish a smaller bill.
Do not assume either command preserves or breaks the entire cache in every client version. Use the usage records for your actual run.
Compare the complete continuation
- Prepare equivalent repository snapshots at a defined checkpoint.
- Save the task, constraints, and expected acceptance test.
- Continue one workflow after
/compact. - Continue the other after
/newwith a defined handoff. - Include compaction, repeated discovery, retries, and validation usage.
- Record whether each workflow passes the same acceptance test.
Keep the model, effort, permissions, and tool configuration identical. Repeat the comparison across several tasks. Report the sample size and describe what information the handoff included.
Use a results table with these fields:
| Field | Why it matters |
|---|---|
| Checkpoint and transcript | Establishes equivalent starting information |
| Handoff text | Reveals what the fresh chat received |
| Input, cached input, output | Separates different usage categories |
| Compaction usage | Captures work before continuation |
| Acceptance result | Prevents a failed run from appearing efficient |
| Total elapsed time | Captures the cost of repeated investigation |
If compaction usage is unavailable, label the total incomplete. Do not turn missing telemetry into a zero.
Keep the workflow useful between resets
Better file targeting and shorter command results can reduce unnecessary context before either command becomes necessary. Halv combines code navigation, command filtering, and context compression for coding agents. Download Halv and compare a verified task in your own repository.
For the wider diagnosis, read why Codex uses so many tokens. For persistent instructions, read AGENTS.md token usage.
Sources and scope
Official documentation checked on September 28, 2026.
This guide does not claim a measured percentage reduction for /compact or /new.