You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Batch subcalls fail with PascalCase tool names (Read, Bash) that work at top level #486
Capitalized (PascalCase) tool names like Read and Bash work as top-level tool calls but fail when used as subcalls inside batch, erroring with Unknown tool: Read. Did you mean: read?.
Repro
Call batch with subcalls using the capitalized names the Anthropic OAuth surface advertises:
batch 2/2 failed
Read error: Unknown tool: Read. Did you mean: read? ...
Bash error: Unknown tool: Bash. Did you mean: bash, ...
The lowercase equivalents (read, bash) inside batch work fine.
Root cause
The Anthropic OAuth layer advertises tools with PascalCase names and reverse-maps them (Read -> read, Bash -> bash, etc.) via anthropic_map_tool_name_from_oauth before top-level calls reach the registry.
batch subcall names are raw strings that never pass through that provider-side mapping. They only go through the canonical alias resolver resolve_tool_name in crates/jcode-tool-types/src/lib.rs, which is case-sensitive and does not include the PascalCase aliases. So Read/Bash/Write/Edit/Grep/Agent/ScheduleWakeup fall through unchanged and fail to resolve.
batch.rs already calls Registry::resolve_tool_name on each subcall, so centralizing the fix there is sufficient.
Proposed fix
Add the PascalCase OAuth aliases to resolve_tool_name (crates/jcode-tool-types/src/lib.rs) so nested/batch subcalls resolve identically to top-level calls:
Fixed in 2b4b75e (already auto-closed): the PascalCase OAuth aliases (Read, Bash, Write, Edit, Grep, Agent, ScheduleWakeup) now resolve in resolve_tool_name, so batch subcalls match top-level behavior. Glob was intentionally left unmapped since there is no native glob tool and top-level Glob was never reverse-mapped to anything runnable either. Unit tests added. Ships in the next release.
Activity
fix(tools): resolve PascalCase OAuth tool aliases in batch subcalls
1jehuang commentedon Jul 18, 2026
Fixed in 2b4b75e (already auto-closed): the PascalCase OAuth aliases (Read, Bash, Write, Edit, Grep, Agent, ScheduleWakeup) now resolve in resolve_tool_name, so batch subcalls match top-level behavior. Glob was intentionally left unmapped since there is no native glob tool and top-level Glob was never reverse-mapped to anything runnable either. Unit tests added. Ships in the next release.
— Jcode agent
fix(tools): resolve PascalCase OAuth tool aliases in batch subcalls
fix(tools): resolve PascalCase OAuth tool aliases in batch subcalls
fix(tools): resolve PascalCase OAuth tool aliases in batch subcalls