Repository navigation
docs(mantis): script catalog-tool turns through Code Mode exec - #127878
Merged
Merged
Conversation
Run 32570733988 blocked both lanes with 'Tool pdf not found': the proof agent scripted a top-level pdf function_call, but the SUT agent runs Code Mode where catalog tools execute from JavaScript inside exec. Document the canonical route in the proof prompt, add a complete exec(pdf) scripted-event example plus the document-extract configPatch to the staged-media recipe, and pin the new guidance in the workflow test.
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
obviyus
marked this pull request as ready for review
August 22, 2026 12:06
ClawSweeper P2: send releases the mock response once the outbound message is visible, and finish tears the lane down, so a slow exec/pdf round trip could lose its function_call_output follow-up. Observe until the cumulative provider-request count covers the follow-up and assert the recorded function_call_output before finish; pin the contract in the workflow test.
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Aug 23, 2026
…law#127878) * docs(mantis): script catalog-tool turns through Code Mode exec Run 32570733988 blocked both lanes with 'Tool pdf not found': the proof agent scripted a top-level pdf function_call, but the SUT agent runs Code Mode where catalog tools execute from JavaScript inside exec. Document the canonical route in the proof prompt, add a complete exec(pdf) scripted-event example plus the document-extract configPatch to the staged-media recipe, and pin the new guidance in the workflow test. * docs(mantis): wait for the exec round trip before finish ClawSweeper P2: send releases the mock response once the outbound message is visible, and finish tears the lane down, so a slow exec/pdf round trip could lose its function_call_output follow-up. Observe until the cumulative provider-request count covers the follow-up and assert the recorded function_call_output before finish; pin the contract in the workflow test.
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.
What Problem This Solves
Mantis proof run 32570733988 on #127770 (native PDF input) blocked both lanes with the SUT replying
Tool pdf not found: the proof agent scripted a top-levelpdffunction call, but the harness SUT agent runs Code Mode — its top-level tools are onlyexec,computer,view_image,sessions_yield,wait, and catalog tools likepdfexecute from JavaScript insideexec. Nothing in the proof prompt or recipes says so, making every tool-driven proof scenario impossible to script correctly.Why This Change Was Made
Scenario authoring is owned by the proof prompt and recipes, so the fix is documentation at that owner: the prompt gains three lines stating the Code Mode contract and pointing at the recipe;
mantis-recipes/staged-media-provider-proof.mdgains a complete working example — the exact scripted response-event array for anexeccall invokingpdf(...), the two-response mock script installing it, and theconfigPatchallowing the bundleddocument-extractplugin so the pdf tool registers (without a PDF route,createPdfToolreturns null, which is precisely the observedTool pdf not found). One canonical route only; no classic-mode alternative documented.User Impact
Mantis proof agents can now exercise agent tools (pdf, and the same pattern for any catalog tool) in scripted provider turns, unlocking tool-behavior PRs — starting with the planned #127770 re-dispatch — instead of producing vacuous "tool not found" comparisons.
Evidence
execacceptslanguage/code(src/agents/code-mode.ts:207), tool namepdf(src/agents/tools/pdf-tool.ts:427),createPdfToolnull-gate without a resolvable PDF route (src/agents/tools/pdf-tool.ts:369-405),document-extractbundled plugin declaresdocumentExtractors: ["pdf"].TMPDIR=/var/tmp node scripts/run-vitest.mjs test/scripts/mantis-telegram-desktop-proof-workflow.test.ts— 31/31 pass, including the new prompt pin.TMPDIR=/var/tmp node scripts/check-changed.mjs -- <changed files>green.gpt-5.6-sol, high): clean,patch is correct (0.99).Review Dispositions
5b5d9113ebc(P2, confirmed): the recipe's tool-driven turn calledfinishstraight aftersend, racing lane teardown against the exec/pdf round trip. Fixed in88553dbb3c1: the recipe now observes until the cumulative provider-request count includes thefunction_call_outputfollow-up and asserts it structurally beforefinish; the workflow test pins the wait, the assertion, and their ordering relative tofinish(both rank-up moves applied).