Search the documentation
23 pages for cleanupperioddays.
Titles and paths first, then pages whose text carries it. Each row opens that page as this site last read it.
Persist sessions to external storage
Claude Code CLI · in the page
agent-sdk/session-storage
…transcripts under `CLAUDE_CONFIG_DIR` are swept independently by the `cleanupPeriodDays` setting, following the [retention sweep rules](/docs/en/claude-directory#cleaned-up-automatically). A run [resu…
Subagents in the SDK
Claude Code CLI · in the page
agent-sdk/subagents
…docs/en/sub-agents#resume-subagents) for compaction behavior and the `cleanupPeriodDays` cleanup period. ## Tool restrictions Use the `tools` field to limit what a subagent can do: * **Omit `tools`…
Agent SDK reference - TypeScript
Claude Code CLI · in the page
agent-sdk/typescript
…ontrols the cleanup period. On a machine where no settings file sets `cleanupPeriodDays`, both printed lines show `undefined` for the value, which is the expected output rather than an error. ```type…
Orchestrate teams of Claude Code sessions
Claude Code CLI · in the page
agent-teams
…esumed sessions keep their tasks. Retention is governed by the same [`cleanupPeriodDays`](/docs/en/settings-reference#cleanupperioddays) you already control for session transcripts, following the [ret…
Manage multiple agents with agent view
Claude Code CLI · in the page
agent-view
…footer prompt. When [transcript cleanup](/docs/en/settings-reference#cleanupperioddays) has removed a stopped session's saved conversation, Claude Code refuses to open the row: the message says there…
Claude Code changelog
Claude Code CLI · in the page
changelog
…the app (unless org policy manages retention); the new `desktopSessionCleanupPeriodDays` setting caps the exemption * Fixed being sent to the login screen when another Claude Code process held the t…
Checkpointing
Claude Code CLI · in the page
checkpointing
…/claude-directory#cleaned-up-automatically); change the period with [`cleanupPeriodDays`](/docs/en/settings-reference#cleanupperioddays) ### Rewind and summarize Run `/rewind`, or press `Esc` twice…
Explore the .claude directory
Claude Code CLI · in the page
claude-directory
…e Code deletes the files in the paths below once they're older than [`cleanupPeriodDays`](/docs/en/settings-reference#cleanupperioddays), as long as it can safely determine the retention period. The d…
Manage costs effectively
Claude Code CLI · in the page
costs
…rest of your session data: at startup, it removes files older than [`cleanupPeriodDays`](/docs/en/claude-directory#cleaned-up-automatically), 30 days by default. You can run `/insights` on any plan…
Data usage
Claude Code CLI · in the page
data-usage
…days by default to enable session resumption. Adjust the period with `cleanupPeriodDays`. See [application data](/docs/en/claude-directory#application-data) for what's stored and how to clear it. You…
Hooks reference
Claude Code CLI · in the page
hooks
…it. The session remains on disk until you resume it, subject to the [`cleanupPeriodDays`](/docs/en/settings-reference#cleanupperioddays) retention sweep, which deletes session files after 30 days by d…
Deploy managed settings
Claude Code CLI · in the page
managed-settings
…by these rules: * **Single values**, such as `"model": "opus"` or `"cleanupPeriodDays": 7`: the later file's value replaces the earlier one * **Lists**, such as `permissions.deny` or `sandbox.networ…
How Claude remembers your project
Claude Code CLI · in the page
memory
…nvironments. Claude Code deletes old session transcripts after the [`cleanupPeriodDays`](/docs/en/settings-reference#cleanupperioddays) retention period, but excludes the files in the memory director…
Monitoring
Claude Code CLI · in the page
monitoring-usage
…(/docs/en/claude-directory#cleaned-up-automatically) older than the [`cleanupPeriodDays`](/docs/en/settings-reference#cleanupperioddays) setting. Claude Code runs the sweep in the background at most o…
Manage sessions
Claude Code CLI · in the page
sessions
…day retention | [`cleanupPeriodDays`](/docs/en/settings-reference#cleanupperioddays) | `settings.json` | | Suppress transcript writes in a…
Claude Code settings
Claude Code CLI · in the page
settings
…| | `cleanupPeriodDays` | **Default**: `30` days, minimum `1`. Claude Code deletes [session files and other application…
Example settings files
Claude Code CLI · in the page
settings-example
…hrc)" ] }, "autoUpdatesChannel": "stable", "cleanupPeriodDays": 20 } ``` </Tab> <Tab title="What each key does"> The same file with a comment above each key.…
Claude Code settings reference
Claude Code CLI · in the page
settings-reference
…| Memory and context | Any file | | [`cleanupPeriodDays`](#cleanupperioddays) | Choose how many days Claude Code k…
Create custom subagents
Claude Code CLI · in the page
sub-agents
…omatic cleanup**: Claude Code deletes subagent transcripts after the `cleanupPeriodDays` retention period, 30 days by default, following the [retention sweep rules](/docs/en/claude-directory#cleaned-u…
Configure your terminal for Claude Code
Claude Code CLI · in the page
terminal-config
…removes the cache file. Claude Code deletes cache files older than [`cleanupPeriodDays`](/docs/en/settings-reference#cleanupperioddays), following the [retention sweep rules](/docs/en/claude-director…
Tools reference
Claude Code CLI · in the page
tools-reference
…ine. A draft you leave in the queue expires after 30 days, or after [`cleanupPeriodDays`](/docs/en/settings-reference#cleanupperioddays) when that's shorter. The queue holds 10 drafts across all your…
Use Claude Code in VS Code
Claude Code CLI · in the page
vs-code
…ode keeps the newest 20 exchanges and expires stored threads on the [`cleanupPeriodDays`](/docs/en/settings-reference#cleanupperioddays) schedule, as long as Claude Code can [safely determine the rete…
Run parallel sessions with worktrees
Claude Code CLI · in the page
worktrees
…ent-view#how-file-edits-are-isolated) once they are older than your [`cleanupPeriodDays`](/docs/en/settings-reference#cleanupperioddays) setting, following the [retention sweep rules](/docs/en/claude-…