Repository navigation
tools: tips name the native calls, not how the host runs them - #9
Merged
Merged
Conversation
A shell detour made of several native steps ended its tip with "make them in one turn and they run in parallel, each with its own card", and read's multi-path error said "(they run in parallel)". Both describe a host, not the command: whether several calls in one turn run concurrently is up to the host's scheduler (cap::run is opt-in), and "card" is one host's UI. A host that asks its model for one call at a time got a tip contradicting its own prompt. The tip now lists the calls and stops; the read error says to make one call per file. A host that wants to encourage batching says so itself.
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.
tools: tips name the native calls, not how the host runs them
What was wrong
Two pieces of model-facing text in the toolset describe the host rather than the command:
bash_tool_suggestion()ended every multi-step shell-detour tip with "— make them in one turn and they run in parallel, each with its own card.". The mixed-tool reason inanalyze_detour()said the same.read's error for a multi-path argument said "Make one read call per file (they run in parallel)."Whether several calls in one turn run concurrently is up to the host. mcp-cpp's
cap::runscheduler is opt-in, and a host may run calls one by one. "Card" is one host's UI. A host that asks its model for one call at a time (agentty's local-model prompt does) sent the model a tip that contradicted its own prompt. In three logged sessions with a local Qwen model, the model batched in 1 of 29 tool-calling turns and skimmed past the advice each time.The change
src/tools/util/shell_detour.cpp: the multi-step tip lists the native calls and stops. The mixed-tool reason is "each step is its own native call."src/tools/fs.cpp:read's multi-path error says to make one read call per file.A host that wants to encourage batching can say so in its own prompt or reminder.
Before → after, from the real
bash_tool_suggestion():Single-call tips are unchanged.
Tests
tests/bash_validate_test.cpp: the multi-step tip ends with the last call and mentions neither "parallel" nor "card".tool_robustness_testalready checks "one read call per file", which still holds.