fix(runner): skip parallel_tool_calls default for WebSearch agents on Anthropic - #324
Merged
Conversation
Tembo CAP renamed the public task route mount with no back-compat alias (tembo/monorepo#9519, deployed 2026-07-16). Since then every agent-change dispatch from TAS has failed: /public-api/task/create now falls through to CAP's Zenstack catch-all, which 400s with {"error":{"message":"invalid request path"}}. Same handler and response shape behind the new mount, so this is only the path. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… Anthropic Follow-up to the pydantic-ai 2.13.0 upgrade: Anthropic's current web_search tool runs with server-side programmatic tool calling, and the API 400s on tool_choice.disable_parallel_tool_use combined with it as soon as the agent also has a client/MCP tool: 400 tool_choice.disable_parallel_tool_use: true cannot be used with programmatic tool calling The wrapper's sequential-tool-calls default (and any explicit spec value, with a stderr warning) is now skipped for WebSearch agents on Anthropic models. Non-WebSearch agents keep the sequential default. Verified: the WebSearch + sidecar-tool repro that 400'd now completes; 11/11 wrapper tests pass. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Follow-up to #322, caught by post-deploy verification: the dogfood run of
competitor-monitoring-digestfailed with a new 400 —On pydantic-ai 2.x, Anthropic's web_search tool runs with server-side programmatic tool calling (code-execution-assisted search). The API rejects
disable_parallel_tool_usecombined with it as soon as the agent also declares a client/MCP tool — which the digest agent does (produce_inbox_item). My #322 smoke test had WebSearch but no client tools, sotool_choicewas never sent and the clash didn't surface.Fix:
build_agentskips the sequential-tool-calls default (and drops an explicit spec value with a stderr warning) for WebSearch agents on Anthropic models. Everything else keeps the sequential default (the Attio rate-limit guard).Verification:
🤖 Generated with Claude Code