Process
process is not a standalone task-starting tool but the management interface for exec background sessions. Once a command goes to the background, you need process to observe and intervene.
Common actions
| Action | What it does |
|---|---|
list | list running and recently finished sessions |
poll | get incremental output and check if finished |
log | read complete aggregated log by offset |
write | write text to stdin |
send-keys | send key sequences |
submit | send Enter key |
paste | paste text in bracketed paste mode |
kill | terminate running session |
clear | clean up finished sessions |
remove | delete session; kills first if running |
Typical flow
Start a job
Use
execwithbackground=trueto start a background task.Track it
Use
process listorprocess pollto check running status.Interact if needed
If the task is waiting for input, use
write,send-keys,submit, orpaste.Collect or clean up
After completion, use
logfor full output, thenclearorremoveas needed.
Example
{ "tool": "exec", "command": "npm run dev", "background": true }
Then:
{ "tool": "process", "action": "poll", "sessionId": "<id>" }
Notes
processonly manages background sessions- foreground commands that didn't go to background cannot be handed to
process - session results include
sessionId, duration, tail, exitCode, etc.
Related
- Exec is the entry point to
process