Repository navigation
docs(unstable-v2): require -32602 for a systemPrompt the Agent cannot apply - #2870
Merged
Merged
Conversation
… apply The extensibility page requires `-32602` for a request that cannot be fulfilled without understanding an unknown variant. The system prompt rule only recommended that code for an unadvertised mode or an unsupported content block type. - Require `-32602` when the `systemPrompt` value is the cause: an unadvertised mode, an unsupported content block type, or content that exceeds the Agent's limits. - Drop the "recommended" wording from the error page. - List the rule in the migration guide with the other error rules that were SHOULD in v1 and are MUST in v2.
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
Two v2 pages disagreed on the error code for a
systemPromptthe Agent cannot apply.-32602.-32602, including for an unadvertised mode or an unsupported content block type.This makes
-32602required in the system prompt rule. The related rules for an unadvertised MCP transport and an unadvertised prompt content type already require it.Changes
systemPromptvalue is the cause (an unadvertised mode, an unsupported content block type, or content that exceeds the Agent's limits), the error MUST be-32602. The Agent still MUST return an error and MUST NOT create or resume the session for anysystemPromptit cannot apply.-32602recommended now lists the same three causes as getting-32602.The session setup and error pages are changed in the stable page and its
draft/copy. v1 is unchanged.Notes
claude-agent-acpandcodex-acpalready answer-32602for eachsystemPromptthey reject.Checks
typospass on the changed files.