Keep the agent-sdk backend to the call's tools and report an SDK error as the cause - #25
Merged
Merged
Conversation
…an SDK error as the cause (t29)
…an SDK error as the cause (t29)
…an SDK error as the cause (t29)
…an SDK error as the cause (t29)
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.
On the relocked t26 branch,
corpus ExampleContents UCL_MechEng --suffix pdfrecorded Worksheet_1.pdf (paired with Worksheet_1_solutions.pdf, two sources, 50-odd blocks) aserror: ResultError — Claude Code returned an error result: Reached maximum number of turns (8). The spec call has no tools, so eight turns means the agent-sdk backend let Claude Code use its own tools (Read, Bash, and the rest) on a prompt that mentions file paths, and it wandered until max_turns stopped it. Two fixes in in2lambda_agent/model.py's AgentSDKBackend: passallowed_toolsas exactly the call's tools (none for the spec call) anddisallowed_toolsfor every built-in, and setpermission_modeso nothing prompts; and when the SDK returns an error result, raise ModelUnavailable-styleModelErrorwith the SDK's message so the corpus row readsspec failed: <message>and noterror: ResultError. A test with a fake SDK client asserts the options passed. Done when Worksheet_1.pdf's spec call completes in one turn on the agent-sdk backend (I run it) and the row for an SDK error names the cause.Workbench ticket t29.