claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[BUG] TODOs go back to the beginning after a context compaction

Open lawless-m opened this issue 3 months ago • 4 comments

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

After doing a compact context, the agent begins all the work from the start again instead of picking up where we left off. It then starts to repeat mistakes I have already told it etc. Basically it forgets everything and I have to bootstrap the session to get it to work again.

What Should Happen?

should carry on where we left off

Error Messages/Logs


Steps to Reproduce

work as normal until the context is full, weep silently

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

whatever the final 1.0x was

Claude Code Version

2.0.1

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

VS Code integrated terminal

Additional Information

I'm using the default vs code extension

lawless-m avatar Sep 30 '25 23:09 lawless-m

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/7961
  2. https://github.com/anthropics/claude-code/issues/4878
  3. https://github.com/anthropics/claude-code/issues/6123

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

github-actions[bot] avatar Sep 30 '25 23:09 github-actions[bot]

here's an example from just now (I've cut down some of the noise)

me: the build ends up going to .\bin\Release\net9.0\ i want it to be an exe with no net.90 or release in the path

CC: I'll help you configure the build output to go directly to CRMPollerFixer.exe. We need to modify the project file to set custom output paths.

Update Todos << SHOULD CARRY ON USING THESE

Configure custom build output path to Y:\CSharpDLLs\CRMPollerFixer\

Test the custom build path Read CRMPollerFixer.csproj Edit CRMPollerFixer.csproj ⎿ Added 5 lines

COMPACT HAPPENS HERE

123456789

12345678910111213

This session is being continued from a previous conversation that ran out of context. The conversation is summarized below:

Claude AI usage limit reached|1759788000.

Please continue the conversation from where we left it off without asking the user any further questions. Continue with the last task that you were asked to work on. I'll continue from where we left off. Based on the context, I can see that I was working on the CRMPollerFixer project and there are several modified files in the git status. Let me check the current state and continue with any pending tasks.

Read CRMPollerFixer\Services\ElasticsearchService.cs Read CRMPollerFixer\Services\DocumentProcessor.cs Read CRMPollerFixer\ServiceLib\Elastisearch.cs Based on the context and the modified files I can see, it appears I was working on the CRMPollerFixer project. Let me check what recent changes were made and continue any pending work. Bash ⎿ Show names of modified files IN git diff --name-only OUT CRMPollerFixer.csproj

Bash ⎿ Show changes to project file IN git diff CRMPollerFixer.csproj OUT diff --git a/CRMPollerFixer.csproj b/CRMPollerFixer.csproj index 9f893a1..3b8b502 100644

Let me check if there are any test failures or if I need to run any builds to verify the current state: Bash ⎿ Build the project to check for errors IN dotnet build

Great! The build is successful. Let me check if there are any test scripts or validation that I should run: Read CRMPollerFixer\test_validation.sh

me: Ctrl^C

lawless-m avatar Oct 01 '25 09:10 lawless-m

in fact the TODOs were empty, the build path had been fixed in .csproj so perhaps that is the real issue, the agent sees there are no outstanding TODOs so goes and looks for something to do instead of just doing nothing

lawless-m avatar Oct 01 '25 09:10 lawless-m

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

github-actions[bot] avatar Dec 06 '25 10:12 github-actions[bot]

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

github-actions[bot] avatar Dec 14 '25 14:12 github-actions[bot]