Shell Patterns
Running Commands
Use shell to execute commands. For long-running processes, use background=true.
Background Jobs
- •Start:
shellwithbackground=truereturns ajob_id - •Check:
shell_job_statuswith the job ID to see progress - •Cancel:
shell_job_cancelto stop a running job
Output Handling
- •Shell output is truncated to prevent context overflow
- •For large outputs, pipe through
head,tail, orgrep - •Use
shell_job_statusto poll for completion
Working Directory
- •Commands run in the project root by default
- •Use absolute paths or
cdwithin the command when needed
Timeout Management
- •Default timeout applies to foreground commands
- •Background jobs run until completion or cancellation
- •Use
shell_job_cancelfor stuck background processes