Issue Title
Regression Cache state regression causes step confusion/repetition after several turn
Description
Summary
Enabling prefix cache causes severe context state regression in long-context sessions (50k-100k tokens).
The model exhibits "step confusion": it forgets current progress and reverts to previous steps (e.g., executing Step 3 while claiming to be at Step 5), or fails to recognize file modifications it just made.
Crucially, this issue is NOT present in v0.1.12, where 90k context sessions complete successfully.
And not reproducible when turn off cache.
Environment
- Affected(Tested) Versions: v0.2.14, v0.2.21, v0.3.6
- Working Version: v0.1.12
- Model: Qwen3.6-35B-A3B-MLX-8bit
- Block Size: Auto-aligned to 2048
- Cache Config: Tiered/SSD Cache Enabled, Hot Cache Disabled (hot_cache_max_bytes=0)
- MacOs 26.4.1, M5 Max 128G
- Opencode / Claude code
Reproduction Scenario
- Turn 1: Ask model to write a pinball game (Context ~20k).
- Turn 2: Ask model to execute Open in browser ( some time, module repeatedly open the browser)
- Turn 3: Ask model to change js to typescript 5 (Context ~60k+).
- Bug: Model is trying to do step5 in TODO list, but suddenly claims it is doing Step 3 again or back to create TODO list.
- Bug: Model modifies a file, but in the next turn claims the file is unmodified.
Logs & Evidence
Attachments
- Link to Log: With Cache (Failing - showing step regression), tested on tag 0.3.6, all the other version shows simular cases
- Link to Log: Without Cache (Working), tested on tag 0.3.6
- Link to Log: v0.1.12 (Working)
session-0.1.2-ok.md
session-0.3.6_cached.md
session-ses_0.3.6_nocache.md
Issue Title
Regression Cache state regression causes step confusion/repetition after several turn
Description
Summary
Enabling prefix cache causes severe context state regression in long-context sessions (50k-100k tokens).
The model exhibits "step confusion": it forgets current progress and reverts to previous steps (e.g., executing Step 3 while claiming to be at Step 5), or fails to recognize file modifications it just made.
Crucially, this issue is NOT present in v0.1.12, where 90k context sessions complete successfully.
And not reproducible when turn off cache.
Environment
Reproduction Scenario
Logs & Evidence
Attachments
session-0.1.2-ok.md
session-0.3.6_cached.md
session-ses_0.3.6_nocache.md