{"version":"2.1.234","anchor":"claude-code-project-dir-name-overrides-the-per-project-state","canonical_anchor":"claude-code-project-dir-name-overrides-the-per-project-state","heading":"CLAUDE_CODE_PROJECT_DIR_NAME overrides the per-project state folder","tier":"use","area":"Configuration","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.234\/e\/claude-code-project-dir-name-overrides-the-per-project-state","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.234","markdown":"### `CLAUDE_CODE_PROJECT_DIR_NAME` overrides the per-project state folder\n\nYou can name the per-project history folder yourself, as long as you also set a custom config directory.\n\n**What**\n\nClaude Code keeps each project's history and sessions in a folder under `projects` in its config directory, named after the project path. You can now name that folder yourself with `CLAUDE_CODE_PROJECT_DIR_NAME`, which only applies when `CLAUDE_CONFIG_DIR` is also set.\n\n**Details**\n\n- The name must match `[A-Za-z0-9_-]{1,64}`.\n- Windows reserved device names are rejected: con, prn, aux, nul, com0-9, lpt0-9.\n- When the override differs from the usual path-derived name, history and session lookup searches both folders, so existing sessions are still found.\n\n**Usage**\n\n`export CLAUDE_CONFIG_DIR=~\/.claude-work export CLAUDE_CODE_PROJECT_DIR_NAME=my-project` **Evidence** `CLAUDE_CODE_PROJECT_DIR_NAME`\n\n- Area: Configuration\n- Names: `CLAUDE_CODE_PROJECT_DIR_NAME`, `CLAUDE_CONFIG_DIR`\n- Tier: Use it now\n- Useful: 3\/5\n- Signal: 2\/5"}