Agents panel still retains the session entry (status shown as stale) - Claude Code
Quick fix
Update to the latest CC Switch, delete the session again, and check. If the ghost entry remains, add the version, reproduction steps, and logs, then reopen…
Symptom
Section titled “Symptom”Agents 面板仍保留该会话条目(状态显示为 stale),因为 `~/.claude/jobs/` 下的数据未被清理。The Agents panel still retains the session entry (status shown as stale) because the data under `~/.claude/jobs/` was not removed.
When CC Switch deletes a Claude Code session, it removes the transcript under `~/.claude/projects/` but does not also remove the data maintained by the Agents panel. The deleted session therefore remains visible as a stale or ghost entry; selecting it may also run the current prompt as a new session.
The two issues disagree about the index location: #5700 explicitly identifies `~/.claude/jobs/{session_id}/` and `~/.claude/jobs/{session_id}.json`, while #4854 suggests an entry under `~/.claude/agents/`. The maintainer marked #4854 as a duplicate of #5700, but #5700 was ultimately closed due to timeout, without confirmation that the proposed code was merged. The maintainer only stated that 4.0 substantially refactored the related functionality and recommended updating to the latest version and trying again.
Update CC Switch to the latest version, then delete the Claude Code session again and check the Agents panel.
If the problem persists, provide the CC Switch version, operating system, complete reproduction steps, and relevant logs or screenshots, then reopen the issue.
For a code-level fix, update `delete_session()` to also remove `~/.claude/jobs/{session_id}/` and `~/.claude/jobs/{session_id}.json`. This approach was suggested in the issue but was not confirmed there as merged or successfully verified.
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 2 real issues
(No FAQ yet)
Related problems
Section titled “Related problems”This is an unofficial community wiki with no affiliation to the cc-switch authors or the project itself. Its content is compiled from the project's public GitHub issues. This site distributes no software.