[FEATURE] Offer to clear local session history on logout (borrowed/shared machines)

Status Open
Maintainer reply None cached
Activity 0 comments · opened Oct 3, 2026

When Claude Code is used on a machine that isn't the user's own (borrowed or shared laptop), logging out removes credentials but the local transcripts stay under ~/.claude/projects/ as plaintext JSONL (default cleanupPeriodDays: 30, and the cleanup only runs when Claude Code starts). I noticed this on macOS after a borrowed laptop was returned with the previous user's session history still on it.

This is documented behavior, not a vulnerability report. But it is easy to miss, and transcripts can contain secrets that passed through tool output (file contents, command output).

Request: on logout, optionally offer to purge local transcripts, history.jsonl and file history (or a flag such as /logout --purge), and/or print a one-line notice that local history remains on the machine.

Related: #98575, #95322.

(Drafted with Claude's help; reviewed and filed by the reporter.)

View original on GitHub ↗