Skip to main content

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

ActionWhat it does
listlist running and recently finished sessions
pollget incremental output and check if finished
logread complete aggregated log by offset
writewrite text to stdin
send-keyssend key sequences
submitsend Enter key
pastepaste text in bracketed paste mode
killterminate running session
clearclean up finished sessions
removedelete session; kills first if running

Typical flow

  1. Start a job

    Use exec with background=true to start a background task.

  2. Track it

    Use process list or process poll to check running status.

  3. Interact if needed

    If the task is waiting for input, use write, send-keys, submit, or paste.

  4. Collect or clean up

    After completion, use log for full output, then clear or remove as needed.

Example

{ "tool": "exec", "command": "npm run dev", "background": true }

Then:

{ "tool": "process", "action": "poll", "sessionId": "<id>" }

Notes

  • process only manages background sessions
  • foreground commands that didn't go to background cannot be handed to process
  • session results include sessionId, duration, tail, exitCode, etc.
  • Exec is the entry point to process