Task list UI stops advancing in terminal after auto-compact mid-execution

Resolved 💬 3 comments Opened Feb 23, 2026 by iiilisan Closed Feb 27, 2026

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?

When auto-compact triggers during the execution of a task list (created via TaskCreate/TaskUpdate), the task list UI in the terminal stops advancing. The checklist rendered in the terminal appears frozen — tasks that are being completed no longer get visually updated (checked off, status changes, spinner progression). The agent may continue working, but the terminal task list display is stuck at whatever state it was in when compaction occurred.

Additionally, the stale task list persists in the terminal even after all tasks have been completed. It remains visible with its frozen pre-compaction state indefinitely — it is never dismissed or updated to reflect completion.

What Should Happen?

After auto-compact completes and the session resumes, the task list UI should continue rendering progress correctly. Tasks being marked as in_progress or completed via TaskUpdate should be reflected in the terminal output. Once all tasks are complete, the task list should reflect that (all items checked off) and eventually be dismissed as normal.

Steps to Reproduce

  1. Start a Claude Code session with a task that triggers creation of multiple tasks via TaskCreate (e.g., a multi-step implementation task)
  2. Have the agent begin executing the task list, marking items as in_progress and completed
  3. Let the session run long enough to trigger auto-compact mid-execution (or manually trigger /compact while the agent is actively working through the task list)
  4. Observe that after compaction, the task list rendering in the terminal no longer advances — completed tasks don't appear checked off, in-progress spinners don't update
  5. Even after the agent finishes all tasks, the stale task list remains visible in the terminal with its frozen pre-compaction state

Expected Behavior

The task list UI should reconcile and continue rendering correctly after compaction. At minimum, a TaskList call after compaction should refresh the rendered state. The task list should be dismissed or show all-complete once all tasks are done.

Actual Behavior

The task list UI in the terminal appears frozen at its pre-compaction state. The visual task list does not update even as the agent continues to call TaskUpdate on tasks. The frozen task list remains visible indefinitely, even after all work is complete.

Related Issues

  • #26698 — Task list state not reconciled after context compaction (closed as dup of #8544, focused on task state, not UI rendering)
  • #22670 — Background task counter not decremented after compaction (related but about background tasks, not TaskCreate/TaskUpdate UI)
  • #8544 — Old TodoWrite-era issue about todos resetting after compact (autoclosed for inactivity, predates current Task tools)

Claude Model

Opus

Is this a regression?

I don't know

Claude Code Version

Latest (2.1.x)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

VS Code integrated terminal

Additional Information

The issue appears to be that the TUI component rendering the task list checklist doesn't re-render or reconcile its state after the conversation context is compacted. The underlying task state may be correct (tasks are stored on disk), but the terminal rendering layer doesn't pick up the post-compaction state.

View original on GitHub ↗

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