Skip to content

Commit 947a722

Browse files
committed
Add a "why" section
1 parent a227473 commit 947a722

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,24 @@ Then use commands like:
2626
- "Run tests in parallel and show me the results"
2727
- "Start a server and tell me when it's ready"
2828

29+
## Why async bash?
30+
31+
When working with long-running commands like builds, tests, or servers, the agent needs to:
32+
- Monitor progress incrementally without committing to a fixed timeout
33+
- Run multiple commands in parallel and check each independently
34+
- Make decisions about continuing or terminating based on partial output
35+
- Process real-time feedback as commands generate output
36+
37+
This tool provides the agent with better information for decision-making, leading to faster task completion and fewer confused responses.
38+
39+
**Key advantages over the built-in bash tool:**
40+
- **Better decision making**: Agents can see partial output and make informed choices about continuing or terminating
41+
- **Parallel execution**: Run multiple commands simultaneously
42+
- **No timeout guessing**: Check progress incrementally instead of setting timeouts upfront
43+
- **Faster iterations**: No waiting for arbitrary timeouts when errors are already visible
44+
45+
This tool is designed to replace opencode's bash tool for any scenario involving potentially long-running commands, giving agents the information they need to make better decisions and save you time.
46+
2947
## Tools
3048

3149
**spawn** - Launch a bash command asynchronously

0 commit comments

Comments
 (0)