Claude is stuck on a question. Answer it from Discord.
说明与用途
桥接工具允许用户通过 Discord 回答 Claude Code 的提示,自动将回复输入到 tmux 会话中,消除了需要在键盘前的需求。
问题
Claude Code stops after a few minutes and waits for a user reply that must be typed into a terminal, but the user is not at the keyboard.
结果
The bridge allows a user to answer Claude Code prompts from a phone via Discord, automatically typing the reply into the running tmux session, eliminating the need to be at the keyboard.
工作流
- Run Claude Code inside a tmux session named for the project.
- Configure a Notification hook that triggers when the agent is blocked.
- Set up a Discord bot that DMs the user with the question card.
- User replies with option codes (e.g., 1:1 2:1 3:1).
- The bridge script receives the reply, loads it into a tmux paste buffer, sends Escape to close any selector, waits for the footer to disappear, then pastes the reply and presses Enter.
- The agent receives the input and continues execution.
证据
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.
The bridge treats the terminal as the API.
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.
- 记录日期: 2026-10-18T00:56:11.145Z