[FEATURE] Delete Claude Code sessions
Open 💬 45 comments Opened Dec 10, 2025 by kalam-87
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
When using Claude Code (not CLI or chat) in the browser, smartphone app, or desktop, there is no way to delete sessions that I created. I can archive, but there is no way to delete sessions, which is worrisome.
Edit: this is not related to Claude Code cli or VSCode extension, this is related to the "online" IDE like experience available through the browser or desktop app.
Proposed Solution
The ability to delete sessions.
Alternative Solutions
NA
Priority
High - Significant impact on productivity
Feature Category
Other
Use Case Example
_No response_
Additional Context
_No response_
45 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
I don't think the possible duplicates are the same - I am referring to the entire session:
<img width="436" height="412" alt="Image" src="https://github.com/user-attachments/assets/89f64ff1-c26e-410d-ba9f-7bfd947135ef" />
<img width="1446" height="1067" alt="Image" src="https://github.com/user-attachments/assets/4efefa15-926a-41af-8572-4b7ba38e810f" />
The fact that this isn't already in place is absolutely wild.
Yup, I guess they want to keep the back door open to use the sessions (specifically the repos they pulled) for training purposes at some point. It's not enough for them that I pay for a service, they also want my data. At least this is what it looks like.
Seconding this. Claude Code with the VS Code UI creates a lot of 'empty' sessions (which technically still have a few hundred tokens of usage, AFAIK). A feature to automatically clean these up is needed.
The original post asks for a function to allow manual deletion, which is equally important.
I was trying claude code for vscode today and found that the past sessions can't be deleted. That's insane, I could only guess they want to keep the sessions for training, unbelievable man.
Ohhh, I figured out how to delete them. Run cmd
rm -rf ~/.claude/projects/*, or if you only want to delete sessions for a specific directory, find the directory name in~/.claude/projectsand remove it.Does not work for Claude Code "online" (not Claude Code local/VSCode)
Well, I think the claude team need to add this feature
@duan-contek
Hi, regarding session management, we have implemented a wrapper in x-cmd that supports deleting, listing, and restoring claude-code sessions.
You can find the usage and examples here: https://www.x-cmd.com/mod/claude/cookbook-6
Hope this helps!
Seems like they have added the deletion button, which eventually doesn't work. The HTTP request returns 404 error (not_found_error).
<img width="358" height="46" alt="Image" src="https://github.com/user-attachments/assets/5a764681-4717-4042-a2d4-fe572552eaa6" />
What's the diff between what's in
.claude/session-env/and./claude/projects?Confirmed, I cannot delete any of my archived sessions in WebUI. It always says failed and try again. I reported this as a bug 2-3 days ago but didn't got any reply so far. I can click on the sessions and see everything is still there. It doesn't even say WHY it fails. Its so frustrating to see such a basic feature isn't (properly) implemented.
And you cannot unarchive your sessions either.
fwiw, I nuked the git worktree, which eventually cleared it from the web client, and then nuked it from '/Users/<username>/Library/Application Support/Claude/claude-code-sessions'. It no longer appears in the app or in the web client. It is definitely harder than it should be, but it appears to at least be possible.
When you click on the trash can in the session in Claude Code UI, you can delete the chat.
A DELETE request
https://claude.ai/session-proxy/{sessionId}is sent and a response is successfully returned.Okay, the Delete button seems to be working now in the Web UI.
However, it's still unclear how to unarchive a session.
Yes, it worked for a few days, but now it's broken again. It looks like they're making changes to the WebUI every day. I wish I could just "freeze" an environment that I think is stable enough to work with, and they would create an opt-in beta WebUI to make daily changes to it.
sorry. newbie here, so how can I delete a session on claude code extension? or there is no feature as that, is it a slash command? thank you for whoever is answering genuinely
https://github.com/anthropics/claude-code/issues/13514#issuecomment-3709753641
I found a third-party VS Code extension that can manage: https://marketplace.visualstudio.com/items?itemName=es6kr.claude-sessions
Would be nice if there was a remove or archive slash command when working with sessions themselves without having to hunt around for the right file in
~/.claude.<img width="358" height="46" alt="Image" src="https://github.com/user-attachments/assets/664ab66d-20d7-4bb5-b866-ab17cdd086ba" />
Can't delete sessions still.
A threat actor who gained access to my GitHub account stole my account on the Claude AI Web platform, which I used to fix a bug, and downloaded the entire project from my company’s GitHub repository to their own computer. Because Anthropic failed to respond to the emails I sent for approximately one month and because the deletion function, one of the most basic features, was intentionally not working, my company filed a $10 million compensation lawsuit against Anthropic for failing to meet its GDPR obligations. This company is illegally downloading user repositories and training its models using customer conversations. Instead of wasting your time here, take legal action against this criminal organization.
<img width="406" height="62" alt="Image" src="https://github.com/user-attachments/assets/6d0c30c0-77b0-42f2-b704-d06ce166dc5f" />
Can't delete sessions still. How can i delete claude code cloud session ???
I will check inspect network
request example
Delete
https://claude.ai/session-proxy/sessionid
empty payload
and response
{
"type": "error",
"error": {
"type": "not_found_error",
"message": "Not Found"
},
"request_id": "req_id"
}
bump
same issue on my side, for the last month, unable to delete any previous sessions. on browser or on the mac app.
anyone in charge? we want delete claude code sessions feature, thanks
@acutype just vide code a / command to do it
I was able to delete it locally at
C:\Users\USER\.claude\projectsbut is it really gone from their servers? Likely not.A delete button could go a long way for trust and safety.
This is really annoying. The worse is that there is no "unarchive". You basically have no idea what is going on with your data and where it is stored.
for CLI users: a hacky workaround and not the exactly the
/delete [session]we are all looking for, but one can configure auto-deletion viacleanupPeriodDays in ~/.claude/settings.json(see https://code.claude.com/docs/en/settings#available-settings)Thanks @emadak47 that could actually work well if I could pair with some ability to preserve specific sessions indefinitely (star them or something)
Community Plugin: session-manager
Built a plugin that goes beyond just delete — full interactive session management TUI.
Repo: https://github.com/GravesXX/session-manager
Install:
claude plugin marketplace add https://github.com/GravesXX/session-manager.gitFeatures
--clean-autoone-click cleanup of auto-generated local-command sessionsControls
↑↓ Navigate · Enter Preview · Backspace Delete · Tab Filter · Type to search · Esc Quit
32 tests, vanilla Node.js, follows official plugin conventions.
Submitted to plugin marketplace. Feedback welcome.
Also bump, I have this workaround but it could easily be included as a /sessions command
#!/bin/bash
Manage Claude Code sessions for the current project.
#
Usage:
./claude-sessions.sh # list all sessions
./claude-sessions.sh --unnamed # delete all unnamed sessions
./claude-sessions.sh --name "Session X" # delete session named "Session X"
PROJ=$(echo "$PWD" | sed 's|/|-|g')
DIR="$HOME/.claude/projects/$PROJ"
if [ ! -d "$DIR" ]; then
echo "No sessions found for this project."
exit 1
fi
get_name() {
python3 -c "
import json, sys
name = ''
with open(sys.argv[1]) as f:
for line in f:
try:
d = json.loads(line)
if d.get('type') == 'custom-title':
name = d['customTitle']; break
if d.get('type') == 'agent-name':
name = d['agentName']; break
except: pass
print(name)
" "$1"
}
if [ $# -eq 0 ]; then
echo "Sessions for: $PWD"
echo "---"
for f in "$DIR"/*.jsonl; do
[ -f "$f" ] || continue
sid=$(basename "$f" .jsonl)
name=$(get_name "$f")
echo "${name:-(unnamed)} | $sid"
done
exit 0
fi
if [ "$1" = "--unnamed" ]; then
count=0
for f in "$DIR"/*.jsonl; do
[ -f "$f" ] || continue
sid=$(basename "$f" .jsonl)
name=$(get_name "$f")
if [ -z "$name" ]; then
rm "$f"
rm -rf "$DIR/$sid/" 2>/dev/null
echo "Deleted: $sid"
count=$((count + 1))
fi
done
echo "Deleted $count unnamed session(s)."
exit 0
fi
if [ "$1" = "--name" ]; then
if [ -z "$2" ]; then
echo "Usage: ./claude-sessions.sh --name \"Session Name\""
exit 1
fi
target="$2"
found=0
for f in "$DIR"/*.jsonl; do
[ -f "$f" ] || continue
sid=$(basename "$f" .jsonl)
name=$(get_name "$f")
if [ "$name" = "$target" ]; then
rm "$f"
rm -rf "$DIR/$sid/" 2>/dev/null
echo "Deleted: $target ($sid)"
found=1
fi
done
if [ $found -eq 0 ]; then
echo "No session found with name: $target"
exit 1
fi
exit 0
fi
echo "Unknown flag: $1"
echo "Usage:"
echo " ./claude-sessions.sh # list sessions"
echo " ./claude-sessions.sh --unnamed # delete unnamed sessions"
echo " ./claude-sessions.sh --name \"Name\" # delete named session"
exit 1
just kidding, I just made a repo. Go in and follow this and it will take care of it for you:
https://github.com/samlayton99/claude-sessions
Bump
+1. Same problem in Cowork on Windows.
Two additional dimensions this thread hasn't covered:
Archived chats also need deletion. Currently, archiving a Cowork session sends it into a black hole — it disappears from the active list but there's no reliable way to access it again (see #22931, #24534), and no way to permanently delete it. Archive is effectively a one-way trap, not a lifecycle stage. Users need a path from archive → delete, not just active → archive.
This is a data hygiene issue, not just a UX preference. Sessions accumulate project-specific context, file paths, and working decisions. Users should be able to permanently remove sessions they no longer need — not just hide them. "Archive only" means the data persists indefinitely with no user control over its lifecycle.
Platform: Windows, Claude Desktop with Cowork, Opus 4.6.
A cleanup script (run as a Notification start hook) can manage old sessions:
For manual session management, a wrapper script:
Usage:
cc-sessions list,cc-sessions delete abc123,cc-sessions clean 14CCM has session management commands that cover this:
\
\\bash\ccm session list # list all sessions with sizes
ccm session search "project" # find sessions by project name
ccm clean sessions --days 30 # clean sessions older than 30 days
ccm clean all --days 14 # clean everything (9 targets) older than 14 days
\
\The
cleancommand targets: sessions, tmp files, logs, file history, output files, and more. Supports--dry-runto preview what would be removed.\
curl -fsSL https://raw.githubusercontent.com/dr5hn/ccm/main/install.sh | bash\I asked Claude Code to identify a way to delete them and here is a working response:
This is for the remote sessions.
I built a plugin that does this: github.com/urav06/claudestrophobic
It's a skill (not MCP, so no context window cost) that lets you list, delete, and prune sessions from within Claude Code. Session names come from transcript metadata so you're not staring at UUIDs. Deletion covers transcripts, subagent data, file-history, and session-env.
I cross-checked the cleanup paths against Claude Code's recently surfaced internals so nothing gets left dangling.
<img src="https://github.com/user-attachments/assets/9f6ad16c-1b13-4336-81d5-faea0eb3eedd" alt="demo" width="480"/>
Standalone script:
https://github.com/BlazeinPortland/cowork-session-manager/tree/main
Or skill:
https://github.com/BlazeinPortland/cowork-session-manager-skill
Claude Cowork Session Manager
A lightweight desktop tool for viewing and deleting your Claude Cowork chat sessions — no installation required beyond Python 3.
<img width="1304" height="762" alt="Image" src="https://github.com/user-attachments/assets/d5834c9d-da12-48cf-a486-16c03e126626" />
What it does
Runs a local web server and opens your browser to a clean dark-themed UI that lists all your Cowork sessions. You can select one or many sessions and permanently delete them, with a confirmation step before anything is removed.
Dark table listing Cowork sessions with checkboxes and a Delete Selected button
---
Repo:
https://github.com/KenCheung-AIxFinance/claude-code-session-manager
🔧 Claude Code Session Manager (CCSM)
A CLI + TUI utility designed to fully manage and safely delete Claude Code sessions with proper cleanup across all associated data.
---
💡 Why this matters
Deleting a session isn’t just removing a single file. It involves coordinated cleanup across:
~/.claude/tasks/~/.claude/todos/~/.claude/sessions/~/.claude/history.jsonlMissing any of these leads to:
CCSM handles this correctly and safely.
---
✨ Key Features
ccsm info <session-id>)---
🎯 Target Use Cases
---
🔗 Repository
Repo:
https://github.com/KenCheung-AIxFinance/claude-code-session-manager
---
Happy to answer questions or take feedback if you give it a try!
I've made a Rust cli tool that lists, deletes, renames claude code sessions. I know, it's a forth claude session manager in this thread, but here we go anyway 😄 I wanted something genuinely simple and git-cli like 👀 standalone Rust binary also.
https://github.com/Alex-Momotov/cs
Install:
curl -fsSL https://raw.githubusercontent.com/Alex-Momotov/cs/main/install.sh | shUsage: