You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
gentle_review tool dropped under Claude Agent SDK providers: top-level anyOf in its input schema #1698
I searched open and closed issues and did not find a report of this problem.
I reviewed this report and removed credentials, tokens, private paths, hostnames, and other sensitive data.
Problem
The gentle_review tool is never exposed to the model when Pi runs on a Claude Agent SDK provider (for example pi-claude-bridge). The sibling tools gentle_review_capture, gentle_review_capture_group, and gentle_review_scope do appear. Without gentle_review there is no inspect/START entry point, so the whole native review (RDD) lifecycle is unreachable: no consent panel, and review subagents are rejected with "no current controller-owned candidate view lineage binding".
Root cause: REVIEW_CONTROLLER_PARAMETERS (extensions/gentle-ai.ts, around line 4869) is an object schema with a top-level anyOf (used to split start/assess from the other operations). The Anthropic API rejects oneOf/anyOf/allOf at the top level of a tool input_schema, and Claude Code silently drops MCP tools whose schema fails that check. The other review tools use plain object schemas, which is why only gentle_review disappears.
Steps to reproduce
Install gentle-pi v4.0.0 and pi-claude-bridge (0.9.1) and select a Claude model served through the bridge.
Start a Pi session in any Git repository with the review switch enabled.
List the available tools, or ask the agent to call gentle_review with {"operation":"inspect"}.
Observe that gentle_review is absent while gentle_review_capture, gentle_review_capture_group, and gentle_review_scope are present. /reload does not change it.
Expected and actual behavior
Expected: gentle_review is available on every provider, so the agent can run inspect and START.
Actual: under Claude Agent SDK providers, gentle_review is dropped from the tool list and native review cannot start.
Suggested fix: keep the top-level schema a plain type: "object" (the union of operations and inputs already lives in properties) and move the per-operation start/assess vs. string-only input rule into runtime validation inside execute, or into nested properties only.
Local workaround applied in the bridge: strip top-level oneOf/anyOf/allOf from each tool's inputSchema in the MCP tools/list response. Pi still validates arguments against the original registered schema.
The root cause is indeed the top-level anyOf in REVIEW_CONTROLLER_PARAMETERS (extensions/gentle-ai.ts:4869), introduced in #1678 to distinguish START/ASSESS from string-only operations.
While Pi's internal Anthropic adapter (streamAnthropic) runs a custom pre-transport pass that strips root anyOf and falls back to root properties, external runtimes like pi-claude-bridge and Claude Code consume the registered tool schema directly via MCP tools/list. The Anthropic API enforces strict JSON Schema requirements on tool input_schema and rejects root-level union combinators (anyOf, oneOf, allOf), causing Claude Code to drop gentle_review entirely.
The clean architectural fix:
Flatten root schema to type: "object": Drop the root anyOf from REVIEW_CONTROLLER_PARAMETERS. The nested anyOf under properties.input ([REVIEW_JSON_STRING, { type: "object" }, { type: "null" }]) is standard and valid across all providers.
Preserve fail-closed runtime safety: parseReviewControllerParameters (lines 5136-5140) already enforces that non-START/ASSESS operations reject objects with Review controller input must be a string.
We verified this locally: flattening the root schema restores tool registration in Claude Agent SDK while keeping all validation tests and controller authority gates 100% fail-closed.
Independent confirmation from a Gentle Shell standalone setup (WSL2, Pi 1.0.0, pi-claude-bridge 0.9.0, gentle-pi main a8ecb141). It has reproduced in every session since 2026-10-03, and since then we have been running every RDD review from a separate native Claude Code session.
Additional evidence that closes the diagnosis:
It is not tool deferral. The bridge hands 66 tools to Claude Code. The prompt_snapshot attachment in the CC transcript shows 64 tools sent to the API, without gentle_review. There is no deferred_tools_delta attachment.
Minimal repro, no model calls. With Agent SDK 0.3.281 (CC 2.1.281), tools: [], and an in-process MCP server like the bridge's, I registered two tools that differ only by a root-level anyOf. The system/init message lists only the plain tool; the other one is dropped before any request, with no diagnostic.
#1710 fixes it and already has green CI and a review. Could a maintainer triage this issue (status:approved) to unblock #1710? Until then, the RDD lifecycle is unreachable from every Claude Agent SDK based provider. If it helps, I am happy to validate #1710 end to end on this setup.
Activity
carlosmoradev commentedon Oct 3, 2026
Spot-on diagnosis, @AlejandroTatum.
The root cause is indeed the top-level
anyOfinREVIEW_CONTROLLER_PARAMETERS(extensions/gentle-ai.ts:4869), introduced in #1678 to distinguish START/ASSESS from string-only operations.While Pi's internal Anthropic adapter (
streamAnthropic) runs a custom pre-transport pass that strips rootanyOfand falls back to root properties, external runtimes likepi-claude-bridgeand Claude Code consume the registered tool schema directly via MCPtools/list. The Anthropic API enforces strict JSON Schema requirements on toolinput_schemaand rejects root-level union combinators (anyOf,oneOf,allOf), causing Claude Code to dropgentle_reviewentirely.The clean architectural fix:
type: "object": Drop the rootanyOffromREVIEW_CONTROLLER_PARAMETERS. The nestedanyOfunderproperties.input([REVIEW_JSON_STRING, { type: "object" }, { type: "null" }]) is standard and valid across all providers.parseReviewControllerParameters(lines 5136-5140) already enforces that non-START/ASSESS operations reject objects withReview controller input must be a string.We verified this locally: flattening the root schema restores tool registration in Claude Agent SDK while keeping all validation tests and controller authority gates 100% fail-closed.
matraket commentedon Oct 5, 2026
Independent confirmation from a Gentle Shell standalone setup (WSL2, Pi 1.0.0, pi-claude-bridge 0.9.0, gentle-pi main
a8ecb141). It has reproduced in every session since 2026-10-03, and since then we have been running every RDD review from a separate native Claude Code session.Additional evidence that closes the diagnosis:
prompt_snapshotattachment in the CC transcript shows 64 tools sent to the API, withoutgentle_review. There is nodeferred_tools_deltaattachment.tools: [], and an in-process MCP server like the bridge's, I registered two tools that differ only by a root-levelanyOf. Thesystem/initmessage lists only the plain tool; the other one is dropped before any request, with no diagnostic.anyOflanded in1f345106(fix(review): accept JSON object arguments without weakening authority #1678, 2026-10-02), and the symptom started the next day.#1710 fixes it and already has green CI and a review. Could a maintainer triage this issue (
status:approved) to unblock #1710? Until then, the RDD lifecycle is unreachable from every Claude Agent SDK based provider. If it helps, I am happy to validate #1710 end to end on this setup.fix(review): flatten gentle_review root schema for Claude Agent SDK (#…