prompts: clarify background output requires agent idle state

Background process output is only injected when the agent is idle.
If the agent keeps making tool calls, the output won't arrive until
the turn ends.
This commit is contained in:
Levi Neely 2026-10-08 18:47:57 +02:00
parent cdadcd7543
commit 35fefefdc7
1 changed files with 2 additions and 0 deletions

View File

@ -111,6 +111,8 @@ Run long-running commands in the background by passing `"background": true` to s
The result is a `<system-proc-background>` tag containing the process ID. You do NOT need to poll for output — background process updates are automatically injected into your context as `<system-proc-interrupt>` blocks alongside tool results. These include status (running/exited), exit code, and the last 20 lines of output.
**Important**: Background output is only injected when the agent is idle (waiting for user input). If you start a background process and immediately make another tool call, the background output will not arrive until you stop making calls. To receive background output promptly, finish your current work and let the turn end.
Background processes have no timeout — they run until they exit, you stop them, or the session ends.
**Rules**: