Commit Graph

1 Commits

Author SHA1 Message Date
kshitijk4poor
11d48c7af4 fix(cli): /worktree new's failure lines say what actually happened
Two paths printed "Created worktree but could not enter it" when that
was not the whole story:

- The gateway refused the move (e.g. session_busy). Nothing moved, but
  the fresh tree stayed on disk, unlisted by /worktree, until quit
  removed it. It is now removed right away (an earlier active tree
  stays active), and the refusal carries the check that fired.
- The gateway accepted the move but this process could not chdir into
  the tree. The session's tools do run in the tree, so the tree is now
  the active one, the success lines print, and the warning is the
  existing "could not enter session's working directory" line.

The step lives in a new hermes_cli/cli_commands_worktree.py, since
cli_commands_mixin.py may not grow.

Refs #134889 (CLI-15)
2026-10-20 15:08:20 +05:30