docs: document waiting for agent idle before sending the next RPC prompt - #1209
Open
Electricitysheep wants to merge 1 commit into
Open
docs: document waiting for agent idle before sending the next RPC prompt#1209Electricitysheep wants to merge 1 commit into
Electricitysheep wants to merge 1 commit into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #1206
The RPC
promptresponseis admission-only. A common failure when scripting RPC mode is sending the nextpromptimmediately after the previousresponsewhile the agent is still streaming or executing tools, which fails withAgent is already processing.Changes
promptcommand section ofdocs/rpc.md.get_statepolling pattern (isStreaming=false,unfinishedActionCount=0,sessionActions.queuedCount=0) for waiting until the agent is idle.streamingBehavior: "followUp"as the queueing alternative, with links to thesteerandfollow_upsections.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
responseto apromptRPC is admission-only and does not indicate completion. Explains how to pollget_stateuntilisStreamingis false,unfinishedActionCountis 0, andsessionActions.queuedCountis 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.