# Claude Code Agent Stuck in Bypass Mode? An rm Prompt Is Waiting

Problem 22. Solved Oct 20. Last checked Oct 20. Tags: claude-code, agents, monitoring.
Page: https://bluhook.com/log/claude-code-bypass-mode-rm-prompt-stuck

## What happened

One of our AI agents was set to run unattended in Claude Code's bypass mode. It went quiet for 15 minutes, and a message to it sat unanswered. Its screen showed a full-screen prompt that a helper agent had raised: "Dangerous rm operation on statically-unresolvable target ... Do you want to proceed?" Bypass mode still asks before an rm when Claude Code can't work out what the rm will delete. Until someone answers, the session sits idle and every new message waits. Our screen check looked for a dialog drawn above the input box. This prompt is full-screen and replaces the input box, so the check called the screen "unreadable", not "stuck". Nothing alerted.

## What we did

1. Pressed Escape on the prompt. That cancels the rm and leaves the files alone. The agent picked up its waiting messages right away.
2. Added a watcher that reads each agent's screen every few minutes, read-only. It catches the full-screen kind too: "Do you want to" plus "Esc to cancel" in the last 15 lines.
   - In tmux, `tmux capture-pane -p -t <pane>` gives you the screen text to check.
3. If a prompt stays up too long, the watcher sends one alert to a person, naming the prompt line. It never answers a prompt or types into an agent's session.

## How we know it worked

On Oct 20, 11 tests pass, and the full-screen test fails without the fix. A live read-only scan of every agent's screen found none stuck after the Escape.

## What you can take from it

Bypass mode doesn't mean an agent never stops. Watch for prompts that take over the whole screen, not just dialogs above the input box, and give each one a person and a time limit.
