Unclear Another condition applies when the variable comes from policy, and it is not clear what that condition is or exactly what the clean-up deletes.
CLAUDE_CODE_TRANSCRIPT_LOCAL_GC turns on local garbage collection of transcripts, meaning automatic clean-up of the saved conversation records Claude Code keeps on your machine. This environment variable can now be supplied through managed policy settings, the settings an organization's administrator deploys to everyone's machines.
When neither the variable nor a remote switch turns it on, the clean-up is off. Setting the variable overrides that.
Administrators can turn on transcript clean-up for their whole organization from policy instead of asking each person to set the variable.
tengu_transcript_local_gc Not enough to sayNothing here resolved what this flag was doing on this version, so nothing here should be read as on or off.
This account: no value returned · anonymous baseline: no value returned · compiled default in v2.1.287: off
These values were read against a different version of Claude Code, so treat them as the nearest reading available instead of one taken on this release.
Read once, for one account on one subscription tier, against v2.1.287. It isn't a statement about your account. What a flag value here can and cannot tell you
The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.
- Improved `CLAUDE_CODE_TRANSCRIPT_LOCAL_GC`: a large transcript file is no longer rewritten when that would free under 10% of itchangelog see the edit
| Limit how large a `-p` or Agent SDK session's transcript file grows | [`CLAUDE_CODE_TRANSCRIPT_LOCAL_GC`](/docs/en/env-vars) | Environment variable |sessions see the edit
Another condition applies when the variable comes from policy, and it is not clear what that condition is or exactly what the clean-up…
A small documentation edit on Manage sessions touched a line naming CLAUDE_CODE_TRANSCRIPT_LOCAL_GC after this was published.