Skip to content

tools: tips name the native calls, not how the host runs them - #9

Merged
1ay1 merged 1 commit into
agentty-org:masterfrom
sail3r:detour-tip-host-neutral
Dec 3, 2026
Merged

1ay1 merged 1 commit into
agentty-org:masterfrom
sail3r:detour-tip-host-neutral

Conversation

@sail3r

@sail3r sail3r commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

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 in analyze_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::run scheduler 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():

tip: these are 2 native calls: `git_log count: 5, oneline: true`; `git_status` — make them in one turn and they run in parallel, each with its own card.
tip: these are 2 native calls: `git_log count: 5, oneline: true`; `git_status`.

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_test already checks "one read call per file", which still holds.

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.
@1ay1
1ay1 merged commit 60f08f9 into agentty-org:master Dec 3, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants