Replace fragile line-by-line reassembly heuristic with a simpler approach: flatten the buffer by converting blank lines to spaces (URL terminators) and stripping remaining newlines (PTY wraps), then match URLs with a single regex on the flat string. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>