fix(agents): keep exec visible for lean local models#87587
Conversation
|
Codex review: found issues before merge. Reviewed June 21, 2026, 4:18 AM ET / 08:18 UTC. Summary PR surface: Source +14, Tests +35, Docs +3. Total +52 across 8 files. Reproducibility: no. live Ollama/Qwen weather-session reproduction was run here. Source inspection does reproduce the narrow catalog mechanism: current main can catalog Review metrics: 1 noteworthy metric.
Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Rebase onto current main, align direct- Do we have a high-confidence way to reproduce the issue? No live Ollama/Qwen weather-session reproduction was run here. Source inspection does reproduce the narrow catalog mechanism: current main can catalog Is this the best way to solve the issue? No, not as currently aligned to current main. The predicate is a good narrow seam for tools mode, but the docs overclaim all Tool Search modes and the shell visibility tradeoff still needs maintainer acceptance. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 9940110b881b. Label changesLabel justifications:
Evidence reviewedPR surface: Source +14, Tests +35, Docs +3. Total +52 across 8 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
ClawSweeper PR egg: ✨ hatched 🥚 common Frosted Proofling. Rarity: 🥚 common. Trait: sparkles near resolved comments. DetailsShare on X: post this hatch
About:
|
|
Thanks @vincentkoc — the maintained current-main replay landed in #101607 as The replay preserves your co-authorship and diagnosis, narrows the exception to policy-filtered Closing this PR as superseded by the landed replay. For future PRs, enabling GitHub's Allow edits by maintainers lets us make these fixups directly on the contributor branch. Thank you for identifying the lean local-model tool-visibility gap. |
Refs #86632.
Summary
Lean local-model mode now keeps
execdirectly visible when Tool Search compacts the rest of the tool catalog. This gives small coding-tuned local models an obvious shell fallback for simple live-data or workspace probes instead of forcing them to search for a domain-specific tool and stop when none exists.This deliberately does not add a
cmdalias or automatically route weather/live-data requests through shell; those are broader behavior and security decisions.Verification
node scripts/run-vitest.mjs src/agents/local-model-lean.test.ts src/agents/tool-search.test.tsnode scripts/run-vitest.mjs src/agents/embedded-agent-runner/run/attempt.tool-search-run-plan.test.tsnode scripts/run-vitest.mjs src/agents/local-model-lean.test.ts src/agents/tool-search.test.ts src/agents/embedded-agent-runner/run/attempt.tool-search-run-plan.test.tsnode scripts/format-docs.mjs docs/concepts/experimental-features.md docs/gateway/local-models.md docs/providers/ollama.mdgit diff --checkcorepack pnpm check:changedoncbx_58160a36c5b3/run_e0befbd1db32(exit 0)Real behavior proof
Behavior addressed: lean local-model Tool Search no longer hides
exec, so small coding models can directly discover shell execution while heavier/default tools remain removed or cataloged.Real environment tested: local linked OpenClaw worktree plus AWS Crabbox Linux runner
cbx_58160a36c5b3.Exact steps or command run after this patch:
node scripts/run-vitest.mjs src/agents/local-model-lean.test.ts src/agents/tool-search.test.ts src/agents/embedded-agent-runner/run/attempt.tool-search-run-plan.test.ts;corepack pnpm check:changedremotely through Crabbox.Evidence after fix: focused tests passed locally after rebase; Crabbox changed gate completed successfully with exit 0.
Observed result after fix: Tool Search keeps predicate-excluded tools visible, and lean mode passes that predicate so
execremains in the direct tool list.What was not tested: a live Ollama/Qwen weather prompt; this patch is the narrow catalog/visibility fix, not an automatic live-data routing policy.