Skip to content

[Feature]: Bidirectional communication with Claude Code session #2863

@pablospe

Description

@pablospe

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I am describing a concrete problem or use case, not just a vague idea.

Area

apps/web

Problem or use case

I have an idea for giving T3 Code the bidirectional communication it needs with Claude Code — while still letting the user drive an interactive, human Claude Code session in its official interface (so their Claude subscription keeps working), and without scraping the terminal or talking to the model API directly. Repo: claude-code-bridge (ccb).

The idea

Channels for inbound general content; MCP tools for outbound. A consumer pushes a message in via a Claude Code channel (notifications/claude/channel); Claude responds by calling one of three MCP tools (bridge_reply / bridge_progress / bridge_done); every turn is persisted as an append-only JSONL event log.

        +-------------------------------------------+
        |   Bridge  ·  T3 Code / ccb serve / ...     |
        |          session state + event log         |
        +-------------------------------------------+
              ||                         ^^
              || channels (inbound)      || MCP tools (outbound)
              vv                         ||
        +-------------------------------------------+
        |          Claude Code  +  ccb plugin        |
        +-------------------------------------------+

How it would work for T3 Code

  • Tab 1 — Claude Code, as-is. The user opens Claude Code in its official interface, authenticated with their normal subscription. Nothing about that experience changes; it's a real, interactive session. Similar to what @t3dotgg was mentioning in the recent video, but it could even be hidden: https://youtu.be/131yAOjxHHQ?t=2147 Image

  • Tab 2 — T3 Code's own interface, talking to the bridge. T3 pushes user messages into the Claude session over a channel (inbound), and Claude's replies come back as structured MCP tool calls (outbound), persisted as a JSONL event stream T3 can read or subscribe to.

  • Net result: T3 Code drives and observes a real, already-authenticated, human-interactive Claude Code session — bidirectionally — without owning the model context or re-authenticating.

What works today

  • The channels-in / MCP-tools-out round-trip works end to end: a message injected on the inbound side surfaces in the live Claude session, and Claude's reply comes back out as an agent.reply event.
  • Inbound channels are currently a Claude Code research-preview surface, so the session is started with the development-channels flag today; the bridge handles the rest (session state, the MCP tool surface, and the JSONL event log).

Demo (in tmux)

This is a TypeScript library and CLI tool. Below is an example of using the CLI. For T3 code, you can utilize the TypeScript library instead:

demo

Proposed solution

Here a possible implementation of this: https://github.com/pablospe/claude-code-bridge

Why this matters

Claude subscription keeps working

Smallest useful scope

Alternatives considered

No response

Risks or tradeoffs

No response

Examples or references

No response

Contribution

  • I would be open to helping implement this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementRequested improvement or new capability.needs-triageIssue needs maintainer review and initial categorization.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions