claude-code - 💡(How to fix) Fix channels: mid-turn inbound injected into TUI input box instead of queuing as discrete turn

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

When a message arrives on a --channels channel (e.g. Telegram) while the Claude session is mid-turn, the channel plugin injects the text directly into the Claude Code TUI input box (❯ <text>) rather than queueing it as its own discrete turn.

Root Cause

When a message arrives on a --channels channel (e.g. Telegram) while the Claude session is mid-turn, the channel plugin injects the text directly into the Claude Code TUI input box (❯ <text>) rather than queueing it as its own discrete turn.

Fix Action

Fix / Workaround

  • Reproduced twice in the same session (same day).
  • A keystroke-injection workaround (tmux send-keys -l) would submit the text, but the Claude Code auto-mode classifier correctly blocks an agent from injecting/submitting into the live founder-facing relay (impersonation guard). So no in-process recovery path exists.
  • Only reliable recovery: full receiver restart.
RAW_BUFFERClick to expand / collapse

Summary

When a message arrives on a --channels channel (e.g. Telegram) while the Claude session is mid-turn, the channel plugin injects the text directly into the Claude Code TUI input box (❯ <text>) rather than queueing it as its own discrete turn.

Reproduction

  1. Start a session with claude --channels telegram (or any channel plugin).
  2. Trigger a multi-step tool-use turn (so the session is mid-turn for several seconds).
  3. Send a message on the channel while the turn is in progress.

Observed behaviour

  • The arriving message text appears in the input box (❯ <text>).
  • When the in-flight turn ends, the buffered text often does not auto-submit — the box is jammed.
  • While jammed, subsequent inbound messages pile up behind it.
  • The session is effectively deaf to further channel input until the box is manually cleared (e.g. receiver restart).

Expected behaviour

  • Each inbound channel message is delivered as its own turn, via the channel/turn queue, regardless of whether another turn is currently executing.
  • The interactive input box is never used as a buffer for channel-sourced messages.

Impact

  • For always-on relay sessions (Telegram concierge, Slack bot, etc.), this silently drops messages and jams the session without any monitoring signal — indistinguishable from a healthy session by passive PID/heartbeat checks.
  • Recovery requires a full receiver restart (clears the input box, but loses the buffered message since the Telegram offset was already advanced).

Additional data (2026-06-09)

  • Reproduced twice in the same session (same day).
  • A keystroke-injection workaround (tmux send-keys -l) would submit the text, but the Claude Code auto-mode classifier correctly blocks an agent from injecting/submitting into the live founder-facing relay (impersonation guard). So no in-process recovery path exists.
  • Only reliable recovery: full receiver restart.

Environment

  • Platform: macOS Darwin 24.6.0
  • Channel: Telegram (--channels telegram)
  • Session mode: --dangerously-skip-permissions (auto-mode bypass)

Linked

  • Internal tracking: lester2684/company-os#56 (OPS-275)
  • Related: lester2684/company-os#49 (OPS-268 — MCP binding drop detection; shares the --channels surface)

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING