Tool name resolution

The agent exposes lowercase tool names in each turn. A model may still emit Claude Code spellings from earlier context: Bash, Read, or ToolSearch. The executor currently rejects these before checking the corresponding available tool.

Contract

At execution, an exact name wins. Three explicit compatibility spellings may resolve to bash, read, and tool_search, respectively, only when that target is already present in the turn's allowed tool list. ToolSearch accepts its query argument as select. A null optional max_results is omitted. All resolved calls use the target tool's schema, preflight, gate, and executor. Unknown or disabled tools remain unavailable. The original call name and ID remain in the conversation and event record.

Acceptance

Public agent-loop execution accepts each observed spelling when its canonical tool is available; invalid arguments still fail validation. A missing canonical tool cannot be invoked through an alias. Exact registered names take precedence. The installed App uses the same worker and must be refreshed after the code is committed.

Bounded implementation

Change openprogram/agent/agent_loop.py and openprogram/programs/_runtime.py; add or extend tests/unit/agent/behavior/test_tool_name_resolution.py and tests/unit/programs/runtime/test_tools_runtime.py. The test first reproduces three failed calls through the tool executor. Keep provider request formats, unrelated tool names, project paths, and permission policy unchanged. Verify alias calls, missing targets, argument validation, exact-name priority, scoped ToolSearch, and the public agent loop. Run the affected agent and runtime suites, link checker, and diff check; record pre-existing failures separately.

Implementation status

The executor resolves the three observed spellings against its per-turn tool list. Tests reproduced the three failures before implementation and passed afterward. The affected agent suites passed 676 tests with two skips and one unrelated static-contract failure, reproduced on the unchanged HEAD. The link checker found 16 links in pre-existing untracked context demo files; this page adds none. Installed App verification remains pending until the local refresh.