Skip to content

Commit 9da01e9

Browse files
committed
refactor: improve worktree safety error message and simplify standalone review guidance
Inline CWD path into the main BLOCKED message and expand "CWD" abbreviation to "working directory" for clarity. Simplify standalone stakeholder-review guidance by removing reviewThreshold config reference and hardcoding HIGH+ threshold.
1 parent b67f25f commit 9da01e9

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

client/src/main/java/io/github/cowwoc/cat/hooks/task/EnforceWorktreeSafetyBeforeMerge.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,9 @@ public Result check(JsonNode toolInput, String sessionId, String cwd)
5555
if (isInsideWorktree(cwd))
5656
{
5757
String reason = """
58-
BLOCKED: Shell CWD is inside a worktree that will be deleted during merge.
58+
BLOCKED: Shell working directory (%s) is inside a worktree that will be deleted during merge.
5959
60-
Current CWD: %s
61-
62-
The merge subagent removes the worktree after merging. If the parent shell's CWD is inside
60+
The merge subagent removes the worktree after merging. If the parent shell's working directory is inside
6361
the worktree when it is deleted, all subsequent Bash commands fail with exit code 1 until
6462
Claude Code is restarted.
6563

0 commit comments

Comments
 (0)