Task list state not reconciled after context compaction
Description
When a conversation undergoes context compaction (due to hitting context limits), the task list state is preserved but any in-progress task updates that occurred before compaction are lost. This results in stale task statuses being displayed to the user after the session resumes.
Steps to Reproduce
- Create a task list with multiple tasks (e.g., 4 wave-based tasks with dependencies)
- Complete tasks over the course of a long session that triggers context compaction
- After compaction, the resumed session continues working and completes remaining tasks
- The task list UI shows stale statuses — tasks that were completed show as
in_progressorpending
Expected Behavior
After context compaction and session resumption, the task list should either:
- Be included in the compaction summary so the resumed session can reconcile task states
- Auto-reconcile based on what work was actually completed
- At minimum, the compaction summary should mention outstanding task list items that need status updates
Actual Behavior
Tasks survive compaction with their pre-compaction status. The resumed session has no awareness that tasks need updating, so the UI shows stale/incorrect task statuses (e.g., "4 tasks (1 done, 1 in progress, 2 open)") even though all work is complete. The user sees contradictory information — the agent reports everything is done, but the task list says otherwise.
Workaround
Manually call TaskList after resuming a compacted session and update stale tasks. This works but shouldn't be necessary.
Environment
- Claude Code CLI on Windows 11 (Git Bash)
- Long-running session with Agent Teams (5 teammates) that triggered compaction
- Task list had 4 items with dependency chains (
blockedBy)
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗