Repeated implicit Skill use rereads unchanged SKILL.md on every turn

Resolved 💬 0 comments Opened Jul 29, 2026 by WanderWang Closed Jul 29, 2026

What version of Codex CLI is running?

codex-cli 0.144.1

The same wording is also present on the current openai/codex main branch.

What subscription do you have?

Not subscription-specific. Observed through a long-lived Codex App Server thread.

Which model were you using?

GPT-5

What platform is your computer?

Linux 6.8.0-55-generic x86_64

What terminal emulator and version are you using (if applicable)?

App Server client; not terminal-specific.

Codex doctor report

Not included. This report concerns deterministic prompt instructions and is reproducible from the generated skills section.

What issue are you seeing?

Consecutive turns in the same loaded thread repeatedly cause the agent to open and read the same unchanged SKILL.md.

The generated skills instructions currently combine these requirements:

  • a matching skill must be used for that turn;
  • skills must not be carried across turns unless mentioned again;
  • after selection, the main agent must read the complete SKILL.md before acting.

As a result, a normal multi-message workflow such as:

  1. “Create an issue.”
  2. Wait for the response.
  3. “Now add the solution plan.”

selects the same issue-management skill again and triggers another filesystem tool call that reads the same complete file. In one audited sequence, the same Issue Owner SKILL.md was opened 5 times across 4 adjacent relevant turns.

This is not an infinite loop and does not involve compaction. Each turn is bounded, but the unchanged file is redundantly read again on every matching follow-up.

What steps can reproduce the bug?

  1. Add a repository Skill whose description matches a two-step workflow.
  2. Start one App Server thread in that repository.
  3. Send a first message that implicitly matches the Skill and let Codex finish.
  4. Send a follow-up message that continues the same workflow and also matches the Skill.
  5. Inspect tool calls or the rollout.
  6. Observe that Codex opens the same unchanged SKILL.md again before acting.
  7. Repeat another matching follow-up and observe another full read.

The source of the behavior is visible in:

codex-rs/core-skills/src/render.rs

Both SKILLS_HOW_TO_USE_WITH_ABSOLUTE_PATHS and SKILLS_HOW_TO_USE_WITH_ALIASES contain the turn-scoped activation wording and unconditional complete-read step. The same text is embedded in the distributed 0.144.1 native binary.

What is the expected behavior?

For the same loaded thread, cwd, Skill identity, and unchanged Skill version:

  • matching follow-up turns should continue to obey the complete Skill instructions;
  • the agent should not need another filesystem tool call to reopen the same SKILL.md;
  • when the Skill changes, the next matching turn should use the updated content through Codex's native invalidation path;
  • a new thread, different cwd, or different Skill source may perform a normal first load.

The solution should be owned by Codex's Skill loader/prompt lifecycle. Users and App Server clients should not need to implement a second cache, mtime/hash watcher, TTL, or “already read” protocol.

Additional information

The App Server already provides the relevant native primitives:

  • structured skill input items let the backend inject full Skill instructions;
  • skills/list supports refresh;
  • skills/changed is the invalidation signal for changed local Skills.

The prompt can preserve turn-scoped selection without requiring an unconditional filesystem reread when the same complete Skill content is already present and has not been invalidated.

Related but distinct: #32169 concerns an explicitly selected Skill being lost after compaction. This report concerns redundant rereads of an implicitly matching, unchanged Skill across ordinary consecutive turns without compaction.

For transparency, this report was drafted and submitted by Codex on behalf of the user operating the affected session.

View original on GitHub ↗