Feature request: Add a small non-compactable preflight rule slot for long-running Codex tasks

Open 💬 2 comments Opened Jun 9, 2026 by solid-hub
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What variant of Codex are you using?

Codex app on Windows. This request is about long-running Codex tasks and may also apply to CLI or other Codex surfaces that use compaction or resume.

What feature would you like to see?

Problem

In long-running Codex tasks, important task context can degrade after compaction or resume.

The riskiest failure mode is not only that Codex forgets recent work, but that it forgets the need to re-check task state, working tree status, and completion evidence before continuing.

AGENTS.md is useful, but it is still part of the model-visible project context. In long sessions or after compaction, core execution rules may not be applied consistently. Large guidance files also consume context budget and can suffer from instruction drift or truncation.

Proposal

Add a small user-configurable non-compactable invariant / preflight rule slot, roughly 2-3KB.

This slot would not be for general memory, project knowledge, long documentation, or summaries of past conversations. It would be for short execution invariants that must remain active after compaction or resume.

It should not bypass or replace OpenAI system or safety policies. It should operate as a limited preflight layer below those policies.

If possible, this slot should be closer to a host/runtime-managed preflight layer than ordinary text prepended to the model prompt. Users should clearly know that the feature exists, what it is for, and when it applies. However, ordinary conversation, project documents, tool output, or model-generated summaries should not be able to change whether this slot is applied or what priority it has.

Example rules:

  • Check the current task state and working tree status before modifying files.
  • Verify direct evidence before claiming completion.
  • Reconstruct state after compaction or resume before continuing work.
  • If state reconstruction fails, stop and report blocked instead of continuing.
  • Do not rely on memory or assumptions for recent edits, file modifications, or verification status.

Expected behavior

After compaction or resume, Codex should still apply these small preflight rules before continuing work. If the conditions cannot be satisfied, Codex should pause, ask for confirmation, or report a blocker instead of proceeding confidently.

This proposal is not intended to replace a full memory system or AGENTS.md. The goal is not to add more instructions, but to separate a minimal execution contract that must not disappear during long-running tasks from the normal compaction path.

Additional information

Related issues:

  • #5957
  • #14348
  • #8573
  • #13386
  • #17401
  • #25792
  • #17148
  • #21777

---

_This issue was drafted with assistance from Codex._

View original on GitHub ↗

2 Comments

github-actions[bot] contributor · 2 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #26889
  • #25792
  • #25900

Powered by Codex Action

solid-hub · 2 months ago

Thanks for the duplicate detection. I reviewed #26889, #25792, and #25900.

These are related, but I do not think #27130 is a full duplicate:

  • #26889 proposes thread context pins as untrusted user-provided context; this issue asks for a preflight/invariant layer.
  • #25900 focuses on preserving the current task checkpoint / continuation pointer; this issue is about execution invariants across compaction/resume.
  • #25792 reports the failure mode where compaction can lose AGENTS/custom rules and task progress; this issue proposes a narrow product surface to address that class of failure.

So the request here is not general pinned context, full task memory, or a checkpoint summary. It is specifically about a small non-compactable preflight/invariant layer: minimal execution rules that remain active across compaction/resume, such as re-checking task state, working tree status, and completion evidence before continuing.