How to delete CodeWhale session history, and what you lose
Each session is a single JSON file; remove the file, or clear the sessions directory
CodeWhale keeps one pretty-printed JSON file per session under its sessions directory. Older builds that ran as deepseek-tui stored transcripts under ~/.deepseek/sessions/, which CodeWhale migrates on first access.
Where the sessions are
${CODEWHALE_HOME:-~/.codewhale}/sessions/<id>.json
~/.deepseek/sessions/<id>.json
By default, session transcripts live at ~/.codewhale/sessions/<id>.json. Setting CODEWHALE_HOME moves the entire configuration and session store, and acts as an isolation boundary so the legacy ~/.deepseek/ root is not consulted. DEJA_CODEWHALE_ROOT overrides the session directory for deja's reads alone.
Beside the session transcripts, sessions/ contains bookkeeping files such as offline_queue.json and session_boot_owners.json, and since 0.10.0, per-session runtime directories (sessions/<id>/) for approval receipts and artifacts. Your configuration lives in ~/.codewhale/config.toml, MCP server settings in mcp.json, and custom slash commands under commands/; none of these are touched when clearing session files.
How to delete one session
Close CodeWhale first so a running session cannot rewrite its transcript, then remove the session's JSON file:
rm "${CODEWHALE_HOME:-$HOME/.codewhale}/sessions/<id>.json"
If CodeWhale 0.10.0 created a runtime state directory for the session, remove it as well:
rm -rf "${CODEWHALE_HOME:-$HOME/.codewhale}/sessions/<id>"
If your machine was upgraded from deepseek-tui and the session has not yet been migrated into the current root, check and remove it from the legacy directory:
rm -f ~/.deepseek/sessions/<id>.json
How to delete all sessions
With CodeWhale closed, remove all session JSON files from the store:
rm -f "${CODEWHALE_HOME:-$HOME/.codewhale}/sessions/"*.json
rm -rf "${CODEWHALE_HOME:-$HOME/.codewhale}/sessions/"*/
To clear legacy sessions from before the rebrand as well:
rm -f ~/.deepseek/sessions/*.json
Do not delete ~/.codewhale/config.toml or ~/.codewhale/mcp.json: your provider keys, model options and MCP server wiring stay preserved.
Index before deleting
deja delete does not currently list CodeWhale in its automatic deletion command. If you want past answers, commands and reasoning to remain searchable across your projects after deleting the source transcripts, index them with deja first:
deja index deja "CodeWhale session about the refactor"
Once indexed, deja stores a compact local record. If you later decide to purge a session from deja's index too, run deja forget <id> to remove it permanently and leave a tombstone preventing re-indexing.
What you lose
The full conversation messages, tool calls (such as read, write, edit, and bash), execution receipts with command exit codes, and diffs. Once deleted, codewhale --resume <id> (or codewhale --session-id <id>) can no longer find or reopen the session.
Keeping it searchable instead
deja reads CodeWhale sessions, alongside forty-two other coding agents on your machine, into one local index:
curl -fsSL https://raw.githubusercontent.com/vshulcz/deja-vu/main/install.sh | sh deja "codewhale session about the migration"
Indexing and search stay local, credentials are stripped as the index is built, and deja forget drops a session for good when you do want it gone. DEJA_CODEWHALE_ROOT lets you point deja at a backup directory or external disk without moving CodeWhale.
Where every agent keeps its history · Memory for CodeWhale · The CodeWhale format
Found this useful? Star deja-vu on GitHub.