Skip to content

in goal last steer is re-included after each compaction #21291

@Szpadel

Description

@Szpadel

What version of Codex CLI is running?

v0.129.0-alpha.8

What subscription do you have?

pro

Which model were you using?

No response

What platform is your computer?

No response

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

No response

What issue are you seeing?

After each compaction event agent is re-reacting to last sent steer message that is no longer relevant.

What steps can reproduce the bug?

  1. Start long running /goal
  2. At some point sent steer like, refactor X now
  3. Agent will address steer message as expected, and continue normally
  4. Compaction happens
  5. Agent re-recive last steer again and tries to address it again
  6. This will repeat after every future compaction

What is the expected behavior?

Steer should not be re-included after compaction or, next goal cycle should displace user messages in history

Additional information

Here is codex analysis of the issue:

  • turn/steer becomes pending input, then gets recorded as a normal user message once consumed.
  • Compaction preserves recent non-summary user messages. It does not know that an old user message was
    only a temporary steer.
  • /goal continuation prompts are injected as developer messages, not user messages, so they do not
    displace that old steer as the latest “real user” message.
  • After each compaction, the replacement history can still contain that old steer as the most recent
    real user message, plus a fresh summary. The model can then treat it as newly salient and react to it
    again.

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIIssues related to the Codex CLIbugSomething isn't workingcontextIssues related to context management (including compaction)sessionIssues involving session (thread) management, resuming, forking, naming, archiving

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions