[BUG] Agent view: Ctrl+X delete on Completed sessions doesn't persist — rows reappear at bottom of Completed; sessions double-rendered (2.1.204)
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?
In agent view (claude agents), pressing Ctrl+X twice on a stopped/completed session removes the row momentarily, but it reappears at the bottom of the Completed group on the next render. There is no way to shrink the Completed list from the TUI. This worked correctly on a prior version and regressed after an auto-update.
Additionally, the same session is rendered more than once in a single frame (e.g. clearpath robotiq gripper addition, drp_deploy to tianji jetson, and new clearpath datagen pipelines each appear twice), and the row count in the view substantially exceeds the number of jobs on disk. This points to agent view enumerating sessions from multiple stores without de-duplication, and the delete only clearing one representation while another store re-derives the row.
The trigger appears to be a daemon restart from a mid-session auto-update: claude daemon status reported one background worker "from a different CLI version" immediately before all historical sessions flooded into the view.
What Should Happen?
Ctrl+X twice on a session removes it from agent view and it stays removed (transcript retained on disk for claude --resume, per the documented behavior). Each session renders exactly once.
Error Messages/Logs
Steps to Reproduce
Run claude agents in the linux terminal and try to delete an existing session using ctrl+x (twice)
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.204
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
VS Code integrated terminal
Additional Information
_No response_
Showing cached comments. Read the full discussion on GitHub ↗
4 Comments
Suffer the same issue.
claude agents --json --allreturned only the 9daemon-managed background sessions. The other ~40 were plain interactive sessions that were
never backgrounded — which per the agent-view docs shouldn't be listed at all.
.jsonlfiles out of~/.claude/projects/<project-slug>/removed exactly those rows from the view (daemon-managedsessions and
memory/untouched, rows stayed gone).not even a momentary removal — suggesting the delete action isn't wired to the transcript-derived
rows at all. On real daemon-managed rows it works.
--json, there's no id forclaude rmeither; with the defaultcleanupPeriodDays(30) the list regrows to a full month of session history with no way toclear it from the TUI.
only the session with error can remove with ctrl + x
Hitting this too on v2.1.204, macOS (Darwin 25.5). Adding a data point that points at the persistence/render layer rather than on-disk state.
Symptom: My
claude agents"Completed" section shows ~50 rows, many of them old one-off sessions ("chat", "new chat", "sales-pitch", "kb header layout comparison", etc.) going back ~5 days. PressingCtrl+Xtwice on any of them does nothing — the row stays put.What I found digging into it:
claude agents --json --allreturns only 13 session records — i.e. the authoritative list is 13, but the TUI renders ~50. The extra ~37 rows have no backing record, which is whyCtrl+Xcan't remove them (nothing to delete).~/.claude/jobs/contained several orphaned job folders holding only an emptytmp/and nostate.json— the leftover shells of sessions whosestate.jsonhad already been stripped (consistent with #75623's description of the incomplete Ctrl+X teardown). These dirs were dated up to a month old.rm -rf'd those 7 orphan job folders — and the phantom rows still remained in theclaude agentsview.That last point is the key one: since removing the on-disk remnants did not clear the rows, the stale entries are being held in the agent-view/daemon in-memory list, not read fresh from disk on each render. So a reliable fix probably needs the view (or daemon) to rebuild its Completed list from the authoritative session records rather than accumulating rows that never get evicted.
Happy to provide more detail (roster.json, jobs dir listing) if useful.
Thanks for the clear report — both parts are real.
For the long list of old entries in the Completed group: quit
claudeand start it again — no update needed. If it's still there on the first try, one more restart clears it.Ctrl+X not sticking and rows rendering twice is fixed and will be in an upcoming release.
Consolidating #75557 here.