{"version":"2.1.332","anchor":"new-host-env-var-claude-code-host-short-scratchpad-enables-t","canonical_anchor":"new-host-env-var-claude-code-host-short-scratchpad-enables-t","heading":"Scratchpad folder redirect, with CLAUDE_CODE_HOST_SHORT_SCRATCHPAD for the desktop app","tier":"use","area":"Scratchpad","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.332\/e\/new-host-env-var-claude-code-host-short-scratchpad-enables-t","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.332","markdown":"### Scratchpad folder redirect, with CLAUDE_CODE_HOST_SHORT_SCRATCHPAD for the desktop app\n\nA scratchpad-folder redirect behind tengu_rosy_mitten applies to the CLI and VS Code, and to Claude Desktop when CLAUDE_CODE_HOST_SHORT_SCRATCHPAD is set\n\n**Unclear.** What this setting controls is not known.\n\n**What**\n\nA scratchpad is a folder where a session keeps temporary working files. This build adds code that can redirect a scratchpad path to a subfolder when the target does not exist or is a folder. It is controlled by a server-side switch called a gate, `tengu_rosy_mitten`. The gate takes the values `on`, `keep` or `off`, and its built-in fallback is `off`. It is always treated as off in remote sessions or when `CLAUDE_CODE_REMOTE` is set. Nothing has been read about what this gate returns, so whether it is turned on anywhere is unknown.\n\nWhich places the redirect can apply to depends on the entrypoint, meaning the app Claude Code was started from:\n\n- `cli` and `claude-vscode` always qualify.\n\n- `claude-desktop` qualifies only when the new environment variable `CLAUDE_CODE_HOST_SHORT_SCRATCHPAD` is set. An environment variable is a setting passed to a program when it starts.\n\n- Background (`bg`) sessions and any other entrypoint never qualify.\n\n`CLAUDE_CODE_HOST_SHORT_SCRATCHPAD` is added to the list of environment variables managed by the host app. It does not appear in the previous build.\n\n**Why**\n\nThis changes where a session's scratch files can end up. The desktop app can now opt into the same behaviour the CLI and VS Code get. In practice the redirect only matters if the gate is turned on from the server.\n\n- Area: Scratchpad\n- Names: `CLAUDE_CODE_HOST_SHORT_SCRATCHPAD`\n- Tier: Use it now\n- Useful: 4\/5\n- Signal: 3\/5\n- Scope: individual\n- Heads-up: no"}