skill: run workers in background for real-time monitoring
Add run_in_background=true to worker dispatch so the user can tail -f the output file to observe the worker's full transcript (tool calls, reasoning, output) in real time. Changes: - Add TaskOutput to allowed-tools - Add "Monitoring Workers" section with tail -f instructions - Update Step 3 to use run_in_background=true and TaskOutput Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
---
|
||||
name: enable-tests
|
||||
description: Sequentially enable disabled tests, fixing divergences by mechanical porting from upstream, and commit.
|
||||
allowed-tools: Read, Write, Edit, Bash, Grep, Glob, Task
|
||||
allowed-tools: Read, Write, Edit, Bash, Grep, Glob, Task, TaskOutput
|
||||
disable-model-invocation: true
|
||||
---
|
||||
|
||||
@@ -44,6 +44,20 @@ Zig/C code, or edit C source files. The worker handles all of that.
|
||||
test file for each small piece, implement them, and build back up until the
|
||||
corpus test passes. See "Drill-Down Strategy" below.
|
||||
|
||||
## Monitoring Workers
|
||||
|
||||
Workers run in the background so the user can observe their progress.
|
||||
After dispatching a worker, **always** print the output file path:
|
||||
|
||||
```
|
||||
Worker output: <output_file>
|
||||
Monitor with: tail -f <output_file>
|
||||
```
|
||||
|
||||
Then wait for the result using `TaskOutput` with `block=true`. The user
|
||||
can `tail -f` the output file in another terminal to watch the worker's
|
||||
full transcript (tool calls, reasoning, output) in real time.
|
||||
|
||||
## File Configuration
|
||||
|
||||
Based on the test file argument, look up which files are in scope:
|
||||
@@ -161,11 +175,16 @@ when you have accumulated ~10 passing tests, flush the batch:
|
||||
- Key reference files (from the configuration table above)
|
||||
- If this is a retry after `progress`, include the previous worker's
|
||||
COMMIT_MSG so the new worker knows what was already done.
|
||||
3. Launch via the Task tool:
|
||||
3. Launch via the Task tool with `run_in_background=true`:
|
||||
```
|
||||
subagent_type=general-purpose
|
||||
prompt=<the worker prompt with context filled in>
|
||||
run_in_background=true
|
||||
```
|
||||
4. Print the `output_file` path from the Task result so the user can
|
||||
monitor with `tail -f <output_file>`.
|
||||
5. Wait for the worker to finish using `TaskOutput` with `block=true`
|
||||
on the returned task ID.
|
||||
|
||||
### Step 4: Handle worker result
|
||||
|
||||
|
||||
Reference in New Issue
Block a user