Selective active-context editing ("Exclude from context") for long-running threads
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- rust
- Domain
- developer-experience
Research direction
No files, tests, or entry points are identified. Start by reading related issues #21347, #11325, and #21468, then determine how Codex represents thread context and compaction; done means reversible exclusion and restoration, token-impact visibility, and clear separation from transcript deletion across the listed clients.
Written by the indexing model from the issue text.
Description
What variant of Codex are you using?
Codex App (also applicable to CLI and IDE Extension)
What feature would you like to see?
Summary
I would like Codex to support selective active-context editing for long-running threads.
This is different from deleting an entire thread or deleting chat history for privacy purposes. The goal is to let users inspect and selectively exclude specific messages, turns, or context blocks from the context sent to the model in future requests.
Possible names include:
- Exclude from context
- Forget this block
- Context editor
- Modular context
- Fluid context
Problem
During a long-running coding task, a single incorrect assumption, misleading sentence, outdated requirement, or irrelevant tool result can bias many later responses.
Once I identify the problematic context, my current options are:
- Add another instruction telling Codex to ignore it, which may not reliably override the earlier context.
- Start a new thread and manually reconstruct the valid context.
- Wait for compaction and hope the problematic information is not preserved.
None of these directly fixes the source of the misunderstanding.
Requested behavior
Allow users to:
- Inspect the context currently active for the thread.
- Select one or more messages or context blocks.
- Mark them as Excluded from future context.
- Restore excluded blocks with Undo/Include.
- See an estimated token reduction before applying the change.
- Distinguish between deleting transcript history and excluding content from active model context.
- Edit or regenerate the compacted summary if excluded information has already been incorporated into it.
- Optionally fork the thread from the sanitized context instead of mutating the original thread.
For tool calls, Codex could treat a tool call and its corresponding result as one dependency-aware block, preventing invalid partial histories.
Example
A long task contains an early message saying:
Assume the service always returns schema A.
Later, runtime evidence proves that the deployed service returns schema B.
Even after correcting the assumption, Codex may continue reasoning from schema A because it remains in the conversation history or compacted summary.
I want to select the original assumption and choose:
Exclude from active context
Future turns should then be constructed without that assumption, while the original transcript may remain visible for auditing.
Why this matters
This would:
- Recover long-running tasks from context pollution.
- Reduce repeated corrective prompting.
- Make model behavior easier to debug.
- Potentially reduce future context/token usage.
- Preserve useful thread history without forcing users to restart.
- Give users explicit control over what Codex currently "knows".
Additional information
Related issues:
- #21347 — individual message deletion
- #20251 / #13018 — deleting threads and local session data
- #11325 — manual context compaction
- #21468 — visible and prompt-guided compaction
The key distinction is that this request concerns the effective context sent to the model, not only deletion of stored chat history. A reversible Exclude from context action would also be safer than destructive transcript deletion.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.5k
- Avg merge
- 1m
- Merged PRs (30d)
- 1k
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openai/codex
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
bug CLI windows-os
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
macOS sandbox blocks hw.optional.arm64 sysctl, causing Flutter to misdetect Apple Silicon as x64 Openbug CLI sandbox
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug CLI TUI
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
CLI config enhancement skills
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
A-linter
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
oxc-project/oxc#26863 ·