Fixes issue 3mwixagol2d2e (https://tangled.org/permadeath.com/didbot-claude/issues): a tool call that returned a long run of base64, such as an image read or a screenshot, stalled for up to 60 s while the hook looked for authorize URLs.
The hook now skips any string without /oauth/authorize? in it, and splits the rest on whitespace, quotes and angle brackets before it looks at a word, so the scan is one pass. Each entry in hooks.json times out after 5 s. hook-errors.log moves aside to hook-errors.log.1 once it reaches 1 MB. New tests cover 1 MB of base64 (alone, around a bare authorize path, and beside a real URL) and the log cap. The base64 test fails against the old hook.
🤖 Generated with Claude Code