{"slug": "claude-is-stuck-on-a-question-answer-it-from-discord", "title": "Claude is stuck on a question. Answer it from Discord.", "summary": "A developer built agent-bridge, an open-source tool that sends a Discord DM when a coding agent like Claude Code or Codex is blocked waiting on input, then types the reply from the phone directly into the live tmux pane. Rather than returning allow or deny from a PermissionRequest hook, the bridge treats the terminal as the integration point, letting users answer multi-question prompts with codes like '1:1 2:1 3:1' or send free-form prose. The developer warns that because replies are typed into a live shell, a single Discord account is all that stands between a stranger and the terminal.", "body_md": "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.\n\nA 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).\n\nThose 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.\n\n[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`.\n\nGet 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.\n\nIt types what you send into a live terminal on your machine, so one Discord\naccount is all that stands between a stranger and your shell. Two minutes on\n[Security](https://github.com/Shashank0701-byte/agent-bridge#security) before you install is time well spent.\n\nThe whole thing hinges on one idea: run the agent inside **tmux**, then treat\nthe terminal itself as the integration point instead of hooking into each\ntool's internals differently. That's what makes it work the same way for\nClaude Code, Codex, or anything else you run in a terminal.\n\n```\n you AFK                         tmux session \"myproject\"\n   |                                    |\n   |  Discord DM  <----- notify.sh <----+  Notification hook fires\n   |                                       (Claude Code is\n```\n\n…\nA decision is the whole card, not a buzz that says \"something needs you.\"\n\nYou 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.\n\nTwo projects are two tmux sessions. Each message is tagged with the one it came from. A reply to PromptWall never lands in CodePulse.\n\nA 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.\n\nA `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.\n\nIt 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.\n\nThe 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.\n\nThe 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.\n\nClaude'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.\n\nSo 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.\n\n`pick` is only the digits 1 through 9. The first digit of `12` would already have chosen something.\n\nYou 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.\n\nOn macOS, Linux, or a WSL distro you already have:\n\n```\nbash\ncurl -fsSL https://gitlab.com/shashankchakraborty712005/agent-bridge/-/raw/main/scripts/get.sh | sh\n```\n\n", "url": "https://wpnews.pro/news/claude-is-stuck-on-a-question-answer-it-from-discord", "canonical_source": "https://dev.to/shashank_chakraborty_6362/claude-is-stuck-on-a-question-answer-it-from-discord-3hf5", "published_at": "2026-10-17 23:29:03+00:00", "updated_at": "2026-10-17 23:37:29.610342+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "developer-tools"], "entities": ["Claude Code", "Codex", "Discord", "tmux", "agent-bridge"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/claude-is-stuck-on-a-question-answer-it-from-discord", "markdown": "https://wpnews.pro/news/claude-is-stuck-on-a-question-answer-it-from-discord.md", "text": "https://wpnews.pro/news/claude-is-stuck-on-a-question-answer-it-from-discord.txt", "jsonld": "https://wpnews.pro/news/claude-is-stuck-on-a-question-answer-it-from-discord.jsonld"}}