Summary
After PR #7451 fixed parameter validation, verbose tool summaries no longer show filenames when tools are called with the parameter (Claude Code convention) instead of .
Reproduction
- Enable verbose mode:
- Trigger a tool call that uses (e.g., Claude Sonnet models often use this)
- Observe verbose output shows only emoji + label, no filename
Expected: 📖 Read: src/agents/tool-display.ts
Actual: 📖 Read
Root Cause
src/agents/tool-display.ts functions resolveReadDetail() and resolveWriteDetail() only check for record.path and don't handle record.file_path:
function resolveReadDetail(args: unknown): string | undefined {
if (!args || typeof args !== "object") {
return undefined;
}
const record = args as Record<string, unknown>;
const path = typeof record.path === "string" ? record.path : undefined; // ❌ Missing file_path check
if (!path) {
return undefined;
}
// ...
}
Timeline
Proposed Fix
Update resolveReadDetail() and resolveWriteDetail() to check both parameter names:
const path =
typeof record.path === "string"
? record.path
: typeof record.file_path === "string"
? record.file_path
: undefined;
This matches the parameter normalization logic already present in pi-tools.read.ts.
Impact
- Affects all verbose tool summaries when Claude Code-style parameters are used
- Reduces debugging visibility for read/write/edit operations
Summary
After PR #7451 fixed parameter validation, verbose tool summaries no longer show filenames when tools are called with the parameter (Claude Code convention) instead of .
Reproduction
Expected:
📖 Read: src/agents/tool-display.tsActual:
📖 ReadRoot Cause
src/agents/tool-display.tsfunctionsresolveReadDetail()andresolveWriteDetail()only check forrecord.pathand don't handlerecord.file_path:Timeline
file_pathsupport added inpi-tools.read.tsfor Claude Code compatibilityfile_pathvalidation was broken, so models usedpath→ verbose workedfile_path→ verbose brokeProposed Fix
Update
resolveReadDetail()andresolveWriteDetail()to check both parameter names:This matches the parameter normalization logic already present in
pi-tools.read.ts.Impact