Selective active-context editing ("Exclude from context") for long-running threads

Open 💬 3 comments Opened Jul 17, 2026 by willerhehehe

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:

  1. Add another instruction telling Codex to ignore it, which may not reliably override the earlier context.
  2. Start a new thread and manually reconstruct the valid context.
  3. 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.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗