Already Told You: keep a year of history
Claude Code stores session transcripts in ~/.claude/projects/ and deletes them after cleanupPeriodDays days,
30 by default. /already-told-you:run can only learn from what is still there. (If the user set CLAUDE_CONFIG_DIR,
the script uses that folder instead of ~/.claude.)
- Run
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/keep_history.py --checkand show the output.- "Nothing to do" → tell the user they are already set and stop.
- "STOP: ... not valid JSON" → explain that the settings file has a typo, nothing was changed, and stop.
- Explain in two lines: it will back up
~/.claude/settings.json, setcleanupPeriodDaysto 365, and leave every other setting exactly as it is. Transcripts take disk space (a busy month can be a few GB); 365 days is a year. Transcripts already deleted cannot be brought back. Ask for a yes. - After a yes, run
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/keep_history.py --apply. It asks for permission - let the user answer that prompt. Show the output: the backup path and the value read back from the file. - To undo later: copy the backup file back over
~/.claude/settings.json, or delete thecleanupPeriodDaysline.
Do not edit settings.json any other way.