Repository navigation
fix(cad): agents can recover when a cad tool rejects their arguments - #203
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
Agents in CAD chats kept hitting tool errors they could not recover from. Transcripts showed the same mistakes again and again:
cad_find_partsandcad_measurerejected bad input with a bareinvalid-operationand nodetails. One agent sent{query:"transfer"}three times because nothing said the field isnameQuery.expectedRevisionfromcad_context. Everycad_update_viewbumps the revision, so later reads failed with a barerevision-conflict, and agents retried the stale revision. This was the most common failure after render timeouts.cad_update_viewsaid emptyoccurrenceIdsclears ghosting, but the schema still requiredopacity, so{type:"ghost",occurrenceIds:[]}failed.cad_update_viewpresets areisometric,front, and so on, butcad_featurescript_previewcalls the same viewiso. A camera-preset call failed withExpected "isometric" | "front" | ....Fix
cad_find_partsandcad_measuredecode input with the samedecodeCadToolInputas the other tools, so field errors come back indetails. A stalecad_find_partscursor says why it no longer works.revision-conflicterrors from the view, read, and capture tools name the current revision and snapshot. The descriptions now say to use the latest revision.ghosttakes an optionalopacity(default 0.2). EmptyoccurrenceIdsclears ghosting.camera-presetacceptsisoas another name forisometric. The description lists every preset.Testing
findCadParts,measureCad, andupdateCadView. Onmainall 10 failing calls return bare errors or fail;isoreproduces the camera error exactly. On this branch each error now names the field or revision to fix, and the ghost andisocalls succeed.vp checkhas 0 errors and typecheck is clean. The servercad,provider,mcp, andcadMcptests pass (814 tests), and so do the webcadtests (238).Reviewed with sol-loop: 1 round with gpt-6.1-sol. Sol verdict: approved
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.