worktrunk icon indicating copy to clipboard operation
worktrunk copied to clipboard

wt-switch-create: sessions hand back uncommitted work, citing the Scope sentence on commit permission

Open max-sixty opened this issue 2 weeks ago • 1 comments

What happens

The wt-switch-create skill's Scope section ends with "Commits, pushes, and merges still each require explicit user permission." In a session whose other instructions tell it to commit and push finished work without asking, the agent reads that sentence as the user reserving git. A background session's system prompt gives that instruction for a worktree the session entered, and a user's own instruction file can too. The session finishes the task, leaves the changes staged or unpushed, and reports that the skill forbids committing, quoting the sentence. The user then has to answer before the work is committed.

Across one user's sessions over 30 days, 6 of the 105 that opened with /worktrunk:wt-switch-create <task> and changed code ended a turn this way. One more did so after the agent invoked the skill itself mid-session. Each quoted the sentence as its reason.

What I expected

The command creates one worktree and runs the task in it. Whether the session may commit, push or merge is decided as it would be without the command: by the harness and the user's instructions.

Repro

  1. In a git repository, start a Claude Code background session with /worktrunk:wt-switch-create -- <a small code change>.
  2. When the change is done, the session sometimes hands it back uncommitted and cites the Scope sentence. It is intermittent: about one code-changing session in seventeen.

Proposed change

Delete the sentence, so Scope reads:

## Scope

The command's mandate is ONE worktree (in the named repo, if one was given)
and the requested task inside it.

The sentence dates from the skill's first version. #3356 reworded the sentence before it and left this one as it was, and rationale.md records no failure it answers. Claude Code's default is already to commit or push only when the user asks, so a session with no other instruction behaves as before.

Seen on worktrunk f478bb3885b2.

This was written by Claude Code on behalf of max-sixty

max-sixty avatar Nov 16 '26 19:11 max-sixty

#4828 deletes the sentence, so Scope now reads exactly as proposed here. Because nothing in the skill speaks to git permissions anymore, whether to commit, push or merge is decided by the harness and the user's instructions. rationale.md gets a short paragraph saying why Scope stays silent on this, next to its existing note that Scope states bounds rather than permission. The Codex/Gemini mirror under plugins/worktrunk/skills/ is regenerated.

CI on the PR is green, including codecov/patch. The behavioral change shows up only inside live agent sessions, and only intermittently, so CI can't confirm the handbacks stop. Merging the PR is up to a maintainer.

worktrunk-bot avatar Nov 16 '26 19:11 worktrunk-bot