When a tool call includes "background": true, it executes via proc/new.bg and returns immediately with a PID in a <system-proc-background> tag. The agent tracks active background processes and injects their output as <system-proc-interrupt> blocks alongside subsequent tool results. The model sees background updates without polling. It can react to build failures, log events, etc. naturally. Kill via PID when done. Implementation: - toolsrv client: CallToolBackground (uses proc/new.bg as rdwr) - toolsrv: proc/new.bg upgraded from write-only to request-response - agent: bgTracker collects last 20 lines of output per proc - agent loop: injects interrupts after execToolCalls, before h.update - system prompt: documents the background mechanism and rules |
||
|---|---|---|
| .. | ||
| internal | ||
| test | ||
| .gitignore | ||
| integration_test.go | ||
| main.go | ||
| sandbox-remote.yaml | ||
| server.go | ||