Skip to content

Commit f324282

Browse files
Alex Doanclaude
andcommitted
fix(commands): use background Bash to avoid shell timeout killing servers
Replace ! preprocessing with run_in_background Bash instructions in review, annotate, and annotate-last commands. The ! syntax blocks on waitForDecision() which exceeds the ~120s shell timeout, killing the server and losing unsaved annotations. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent b0c5db9 commit f324282

3 files changed

Lines changed: 13 additions & 7 deletions

File tree

apps/hook/commands/plannotator-annotate.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ allowed-tools: Bash(plannotator:*)
44
disable-model-invocation: true
55
---
66

7-
## Markdown Annotations
7+
## Instructions
88

9-
!`plannotator annotate $ARGUMENTS`
9+
Run `plannotator annotate $ARGUMENTS` using the Bash tool with `run_in_background: true`. This starts an annotation server and opens the browser. The user will annotate the document and submit feedback — this may take a long time.
10+
11+
**Wait for the background task to complete before proceeding.** Do not interrupt or take other actions while the user is annotating.
1012

1113
## Your task
1214

apps/hook/commands/plannotator-last.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ allowed-tools: Bash(plannotator:*)
44
disable-model-invocation: true
55
---
66

7-
## Message Annotations
7+
## Instructions
88

9-
!`plannotator annotate-last $ARGUMENTS`
9+
Run `plannotator annotate-last $ARGUMENTS` using the Bash tool with `run_in_background: true`. This starts an annotation server and opens the browser. The user will annotate the message and submit feedback — this may take a long time.
10+
11+
**Wait for the background task to complete before proceeding.** Do not interrupt or take other actions while the user is annotating.
1012

1113
## Your task
1214

apps/hook/commands/plannotator-review.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ allowed-tools: Bash(plannotator:*)
44
disable-model-invocation: true
55
---
66

7-
## Code Review Feedback
7+
## Instructions
88

9-
!`plannotator review $ARGUMENTS`
9+
Run `plannotator review $ARGUMENTS` using the Bash tool with `run_in_background: true`. This starts a review server and opens the browser. The user will review code and submit feedback — this may take a long time.
10+
11+
**Wait for the background task to complete before proceeding.** Do not interrupt or take other actions while the user is reviewing.
1012

1113
## Your task
1214

13-
If the review above contains feedback or annotations, address them. If no changes were requested, acknowledge and continue.
15+
When the command finishes, read its output. If it contains feedback or annotations, address them. If no changes were requested, acknowledge and continue.

0 commit comments

Comments
 (0)