CLAUDE_CODE_LAZY_WORKTREE

Updated by

CLAUDE_CODE_LAZY_WORKTREE is a Claude Desktop host variable; while it is set, a Desktop session does not offer to commit and push your pull request as you. Default: unset; in the CLI and IDE extensions it has no effect. The question it hides reads "Commit your changes and push them to your pull request, as you?". Values: any value, an empty one included, counts as set. Added between v2.1.326 and v2.1.331 and still present in v2.1.332. It is not in the official reference.

StatusPresent in v2.1.332
AddedAdded between v2.1.326 and v2.1.331
Defaultunset; in the CLI and IDE extensions it has no effect. The question it hides reads "Commit your changes and push them to your pull request, as you?"
Valuesany value, an empty one included, counts as set
CategoryOther
Official docsNot listed
Checked againstv2.1.332

How to set it

For one session, export it in the shell that starts Claude Code:

export CLAUDE_CODE_LAZY_WORKTREE=<value>
claude

To apply it to every session, add it to the env object of a settings file:

// ~/.claude/settings.json
{
  "env": {
    "CLAUDE_CODE_LAZY_WORKTREE": "<value>"
  }
}

Related variables

Frequently asked questions

What does CLAUDE_CODE_LAZY_WORKTREE do?

Is a Claude Desktop host variable; while it is set, a Desktop session does not offer to commit and push your pull request as you.

What is the default value of CLAUDE_CODE_LAZY_WORKTREE?

Unset; in the CLI and IDE extensions it has no effect. The question it hides reads "Commit your changes and push them to your pull request, as you?".

What values does CLAUDE_CODE_LAZY_WORKTREE accept?

Any value, an empty one included, counts as set.

Which Claude Code version has CLAUDE_CODE_LAZY_WORKTREE?

Added between v2.1.326 and v2.1.331 and still present in v2.1.332.

How do I set CLAUDE_CODE_LAZY_WORKTREE?

Export it before starting Claude Code (export CLAUDE_CODE_LAZY_WORKTREE=value), or add it to the "env" object in ~/.claude/settings.json to apply it to every session.

All variables, searchable: Claude Code environment variables.