Skip to content

Codex CLI is not rereading agents.md after auto /compact #5772

Closed

Description

@styler-ai

What version of Codex is running?

0.49

What subscription do you have?

pro

Which model were you using?

gpt-5-codex-high

What platform is your computer?

Windows 11

What issue are you seeing?

If codex auto compacts at 10% context window it doesn't reread the agents.md file which leads to the fact that it doesn't know the project and what to do at all most of times and just creates a mess.
I added clear instructions in the agents.md file what to do what to read etc. etc. so this is imho a must have after /compact.

What steps can reproduce the bug?

Let codex auto compact

What is the expected behavior?

No response

Additional information

No response

Activity

  1. cchance27 commented on Oct 26, 2025

    @cchance27

    honestly they should have it exclude the first message + agents.md from the summarization input, then just reappend the summary after the original message/agents.md to maintain the system prompt and agents.md etc so that accuracy can be maintained per chat

  2. added
    contextIssues related to context management (including compaction)
    on Nov 2, 2025
  3. etraut-openai commented on Jan 10, 2026

    @etraut-openai
    Contributor

    Closing old issue.

  4. escape0707 commented on Mar 6, 2026

    @escape0707

    Are we just vibe-closing open issues now? No explanation about whether OP's problem got addressed at all?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcontextIssues related to context management (including compaction)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions