Add structured JSON logging for tool calls, gated by LOG_LEVEL

main
No checks reported

Commit

Jaxson Sprinkles1mo ago

Each tool call in the agent loop now emits one JSON line to stderr with the tool name, arguments and duration in ms when LOG_LEVEL is INFO or lower (name or number). Unset, WARNING and above, or invalid values are silent, so default stdout/stderr and RunResult are unchanged. Logging failures are swallowed so they can never break a run.

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com Entire-Checkpoint: 01M4KHEAV609HCZD0QM396Q0A1