# Claude is stuck on a question. Answer it from Discord.

> Source: <https://dev.to/shashank_chakraborty_6362/claude-is-stuck-on-a-question-answer-it-from-discord-3hf5>
> Published: 2026-10-17 23:29:03+00:00

Claude Code will happily work for twenty minutes and then stop on a question you could have answered in one line. The terminal is on a desk. You are not.

A few people have already solved the "I'm not at the keyboard" half of this. [jagafarm](https://dev.to/jagafarm) shows that a tmux session is what keeps the agent alive when the laptop lid closes, and that attaching from a phone is the whole trick: [Stop losing Claude Code sessions: a tmux primer for mobile devs](https://dev.to/jagafarm/stop-losing-claude-code-sessions-a-tmux-primer-for-mobile-devs-2p48). [coa00](https://dev.to/coa00) and [yuu1ch13](https://dev.to/yuu1ch13) go further and put Allow and Deny on the lock screen, by blocking inside a `PermissionRequest` hook until ntfy.sh comes back with a decision: [a mobile approval system](https://dev.to/coa00/how-i-built-a-mobile-approval-system-for-claude-code-so-i-can-finally-leave-my-desk-1ida) and [Approve Claude Code permission requests from your phone](https://dev.to/yuu1ch13/approve-claude-code-permission-requests-from-your-phone-47nd). [pederaa](https://dev.to/pederaa) uses the `Notification` hook so you at least find out the agent is waiting: [How to know when a Claude Code agent needs your approval](https://dev.to/pederaa/how-to-know-when-a-claude-code-agent-needs-your-approval-without-watching-the-terminal-5ekf).

Those are the right shapes for yes and no. They are a bad shape for the message Claude actually sends, which is often three questions with descriptions, or a sentence you still have to type.

[agent-bridge](https://github.com/Shashank0701-byte/agent-bridge) takes the tmux half from the primer and the notification half from the hook posts, and then does something they deliberately do not: it types your reply into the live pane. The hook does not wait, and it does not return `allow`.

Get a Discord DM when your coding agent (Claude Code, Codex, etc.) is blocked waiting on you, reply from your phone, and have that reply typed straight back into the session -- no need to be at your keyboard.

It types what you send into a live terminal on your machine, so one Discord
account is all that stands between a stranger and your shell. Two minutes on
[Security](https://github.com/Shashank0701-byte/agent-bridge#security) before you install is time well spent.

The whole thing hinges on one idea: run the agent inside **tmux**, then treat
the terminal itself as the integration point instead of hooking into each
tool's internals differently. That's what makes it work the same way for
Claude Code, Codex, or anything else you run in a terminal.

```
 you AFK                         tmux session "myproject"
   |                                    |
   |  Discord DM  <----- notify.sh <----+  Notification hook fires
   |                                       (Claude Code is
```

…
A decision is the whole card, not a buzz that says "something needs you."

You answer with the codes it printed. `1:1 2:1 3:1` means the first option of each question. The bridge turns those numbers back into the labels Claude is waiting for, then confirms what it sent.

Two projects are two tmux sessions. Each message is tagged with the one it came from. A reply to PromptWall never lands in CodePulse.

A permission prompt is the same idea in one line. `pick 2` presses the digit. Ordinary prose is typed in as if you were sitting there.

A `PermissionRequest` hook can return `allow` or `deny` and Claude continues. That is what the ntfy projects do, and it is the right tool when the only decision is a button.

It does not cover the rest of what the pane is showing. A question card wants the option labels. A plan you disagree with wants a sentence. A follow-up wants whatever you would have typed. The terminal already accepts all of those. So the bridge treats the terminal as the API.

The path is short. Claude's `Notification` hook fires because the agent is blocked. A Discord bot, allowlisted to one user id, DMs you. Your reply is loaded into a tmux paste buffer and pasted into the named session, then Enter. `send-keys` is the wrong primitive here: tmux parses that text as arguments, so a reply that starts with `-` is a flag, and quotes get eaten. A paste buffer is just bytes.

The hook itself returns immediately. `PreToolUse` runs before the question card is drawn. If the hook sat there waiting for your phone, the card would never appear, and you could not answer it from the keyboard either.

Claude's modal selectors treat a paste as a choice. Measured on Claude Code 2.1.241, pasting the word `hello` into an open selector selected the highlighted option, with no Enter. On a plan-approval dialog, that is the agent starting to edit files because you sent a sentence.

So a reply never goes in while that widget is up. The bridge sends Escape, checks that the selector footer is gone, and only then pastes. If the widget is still there, nothing is typed and Discord says so. Refusing is recoverable. Approving a plan by accident is not.

`pick` is only the digits 1 through 9. The first digit of `12` would already have chosen something.

You need three things: a paid Claude plan (the free claude.ai tier does not include Claude Code), a Discord bot that only you can DM, and tmux. On Windows the typing half runs inside WSL. Without WSL you can still get the notifications, and you cannot type back into the pane.

On macOS, Linux, or a WSL distro you already have:

```
bash
curl -fsSL https://gitlab.com/shashankchakraborty712005/agent-bridge/-/raw/main/scripts/get.sh | sh
```


