Coding Agent (bash-first)
Use bash for coding-agent workflows. For long tasks, run in background and monitor with process.
Bash parameters
| Parameter | Type | Description |
|---|---|---|
command |
string | Shell command to execute |
workdir |
string | Working directory (defaults to node workspace) |
timeout |
number | Timeout in milliseconds |
background |
bool | Return immediately with status=running + sessionId |
yieldMs |
number | Wait this many ms, then return running if still active |
Process actions
| Action | Description |
|---|---|
list |
List running/recent background sessions |
poll |
Check if session is running or finished |
log |
Read session logs (supports offset/limit) |
write |
Write raw stdin data to running session |
submit |
Write data + newline (Enter) |
kill |
Kill running background session |
Basic patterns
# One-shot
bash workdir:~/project command:"codex exec 'Add retries to API client'"
# Start long task in background
bash workdir:~/project background:true command:"codex exec --full-auto 'Build settings page'"
# -> returns sessionId
# Monitor
process action:log sessionId:XXX
process action:poll sessionId:XXX
# Send input when needed
process action:write sessionId:XXX data:"y"
process action:submit sessionId:XXX data:"yes"
# Stop if needed
process action:kill sessionId:XXX
Codex notes
# Scratch prompt (Codex needs a git repo)
SCRATCH=$(mktemp -d) && cd $SCRATCH && git init && codex exec "Your prompt here"
# Real project
bash workdir:~/project command:"codex exec --full-auto 'Implement JWT refresh flow'"
Safety rules
- Respect user-selected coding agent.
- Prefer
workdirto keep scope tight. - For long tasks, use
background:trueand report progress fromprocess. - If you kill a session, tell the user immediately and explain why.
- Do not silently switch from orchestration mode to hand-editing code unless user asks.
Converted and distributed by TomeVault — claim your Tome and manage your conversions.