
What happened
osFoundry (an app that runs coding agents in terminal panes) tested three ways to tell when Claude Code 2.1.303 is waiting for a reply; its screen-emulation rules matched all 11 real captures, while reading the last 8 KB of output matched only 5.
Why it matters
Claude Code draws prompts with cursor moves and no newline bytes, so prompt text never appears as a clean line — and a missed permission prompt can stall an agent session.
Summaries like this, every morning.
Claude Code 2.1.303 builds its permission prompt by jumping the cursor to fixed columns with CSI sequences like \x1b[5G rather than writing spaces, and it sends no newline bytes at all — all 11 saved captures (2,099 to 7,672 bytes) contain zero. That design defeats the obvious shortcut of grepping the end of the output. A Python port of osFoundry's rules scored the last 8 KB of each capture after stripping escape sequences and keeping text after the final carriage return, and produced idle for every case, including the four that were truly blocked; the apparent prompt text also ran together into 'Doyouwanttoproceed?'. Feeding the same bytes into a minimal screen emulator that handles only characters, \r \n \b, cursor movement and erase recovered all 11 states correctly.
The osFoundry desktop app follows that conclusion. In terminal_pty.rs each session holds a vt100::Parser, and detection uses only screen_text() from the emulated screen. The 200-line scrollback above it is deliberately excluded, because a prompt that has already been answered and scrolled up would otherwise keep the pane marked blocked forever.
On a live setup with a stand-in agent that copies Claude Code's wording and redraw habits, a 700 ms sweep of all panes cost a median 0.26 s and up to 0.70 s of extra delay, with up to one cycle of lingering state — fine for a badge a person reads. The project's guidance for anyone building their own: classify the emulated screen, match prompt-specific text and footers, put blocked rules above working rules, keep the program that launches agents from editing those rules, and treat the process table as a way to see who is running, not who is waiting.
Pick your industry and the AI tools you use, and get news related to your work every day.
Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →
Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.
Alibaba researchers built Co-Design Bench from real user change requests

A solo founder delegating SNS drafts, blog drafts, candidate outreach and weekly reviews to Claude Code schedu…

A user with no programming background had Claude Code run political clip-video production end to end

Cycaltrust said it obtained Japanese Patent No

In Branding Works' October 2026 survey of ChatGPT and Gemini (143 valid responses), リクルートエージェント appeared in 99…

GitHub, Google and Siemens published 15 design patterns plus six reliability principles for multi-agent system…
