Skip to content

docs: document waiting for agent idle before sending the next RPC prompt - #1209

Open
Electricitysheep wants to merge 1 commit into
PrimeIntellect-ai:mainfrom
Electricitysheep:docs/rpc-idle-detection
Open

docs: document waiting for agent idle before sending the next RPC prompt#1209
Electricitysheep wants to merge 1 commit into
PrimeIntellect-ai:mainfrom
Electricitysheep:docs/rpc-idle-detection

Conversation

@Electricitysheep

@Electricitysheep Electricitysheep commented Aug 11, 2026

Copy link
Copy Markdown

Summary

Closes #1206

The RPC prompt response is admission-only. A common failure when scripting RPC mode is sending the next prompt immediately after the previous response while the agent is still streaming or executing tools, which fails with Agent is already processing.

Changes

  • Added a Waiting for completion note in the prompt command section of docs/rpc.md.
  • Documented the get_state polling pattern (isStreaming=false, unfinishedActionCount=0, sessionActions.queuedCount=0) for waiting until the agent is idle.
  • Pointed to streamingBehavior: "followUp" as the queueing alternative, with links to the steer and follow_up sections.

Verification

Docs-only change; no code paths touched. The described failure was reproduced against v0.7.1 (see #1206).

Note

Document how to wait for agent idle before sending the next RPC prompt

Adds a guidance section to rpc.md clarifying that the response to a prompt RPC is admission-only and does not indicate completion. Explains how to poll get_state until isStreaming is false, unfinishedActionCount is 0, and sessionActions.queuedCount is 0, with example JSON. Also notes the alternative of using "streamingBehavior": "followUp" to queue the next prompt and references the steer and follow_up sections for queued message delivery semantics.

Macroscope summarized cd7af06.

The prompt response is admission-only; sending the next prompt while the
agent is still streaming fails with Agent is already processing. Document
the get_state polling pattern and the followUp alternative.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RPC mode rejects a second prompt with 'Agent is already processing' — docs should explain waiting for idle

1 participant