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

Resolved 💬 2 comments Opened Feb 9, 2026 by Murmurl912 Closed Feb 9, 2026

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_

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗