Skip to content

When context is auto compacted, agent forgot question already answered in previous turn. #11174

Closed as duplicate

Description

@Murmurl912

What version of Codex CLI is running?

0.98.0

What subscription do you have?

Plus

Which model were you using?

gpt-5.2-codex

What platform is your computer?

Darwin 24.4.0 arm64 arm

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

system terminal app

What issue are you seeing?

The auto compact seems make model forget what's doing, and somehow agent answer current turn's final output and also answered previous turn's question.

Turns:
Human: Basicly you move all feature's state to page page?

Agents: Not exactly. We did not move all feature state into the page store. We only lifted shared + render‑related state so features can coordinate without depending on RenderCore.

Human: Also can we make RenderCore intergates with the store in a standalone class, make it easier to isloate logic, prevent ai read viewmodel contain business logic.

Event: Context compacted

Thoughts: I'll check the codebase to confirm all state moved to the page store and ensure RenderCore integration is isolated in a standalone class, verifying no leftover unfinished
tasks before responding to the user.

Agents: Short answer to your question: no. We only lift shared/cross‑feature state + render state into the page Store. Each feature still owns its local UI/logic state (controllers, in‑flight data, feature‑specific view state). That keeps the Store small and avoids feature bloat, while still enabling feature‑to‑feature coordination through AiReadAction.

What I changed

  • Extracted doc sync into code.dart, leaving AiReadViewModel as a composition root.

What steps can reproduce the bug?

  1. Ask question to agent about implementation
  2. Ask agent to implement some feature
  3. Context is auto compacted
  4. Agent finish work and answered prevous turn's question

What is the expected behavior?

No response

Additional information

No response

Activity

  1. added
    bug
    on Feb 9, 2026
  2. ignatremizov commented on Feb 9, 2026

    @ignatremizov

    similar issues: #5957 #9734 #9743 #10336

  3. added
    context
    on Feb 9, 2026
  4. etraut-openai commented on Feb 9, 2026

    @etraut-openai
    Contributor

    Thanks for the bug report. Let's use #9743 to track this. Closing as duplicate.

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

    bugcontext

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions