tmux-passthrough

Enderfga/claude-max-for-openclaw

Otheropenclawby Enderfga

Summary

OpenClaw plugin exposing 0 skills.

Install to Claude Code

openclaw plugin add Enderfga/claude-max-for-openclaw

Run in Claude Code. Add the marketplace first with /plugin marketplace add Enderfga/claude-max-for-openclaw if you haven't already.

README.md

πŸ”“ claude-max-for-openclaw

> The Claude Max / Pro subscription doesn't work with OpenClaw. Anthropic's subscription is bound to the terminal Claude Code CLI β€” it won't route through OpenClaw's API layer. So heavy OpenClaw users end up paying Anthropic twice (subscription for Claude Code + API credits for OpenClaw), or downgrading OpenClaw to free Gemini / Copilot tier. > > This is a 100-line workaround. Instead of fighting the subscription model, lean into it: run Claude Code normally in tmux under your Max subscription, install this plugin, and OpenClaw can now poke at it over a βš™οΈ prefix from any chat channel. Two processes, one thin bridge. Your subscription is fully used, your OpenClaw stays on whatever cheap model you want for routing, and you control both from your phone. > > Think of it as: Anthropic won't sell you an OpenClaw-compatible API add-on β€” so here's one for free.

---

⚠️ Looking for the serious version? β†’ openclaw-claude-code

This repo is the weekend hack. ~100 lines, one evening, zero maintenance. It works, but it's deliberately minimal.

If you actually want to use Claude Code through OpenClaw for day-to-day development, go to my main project:

> ### πŸ”— Enderfga/openclaw-claude-code > > A proper programmable bridge that turns Claude Code (and other coding CLIs) into a headless, agentic engine β€” persistent sessions, multi-engine orchestration, multi-agent council, dynamic runtime control. That's where the real work lives.

The repo you're looking at right now is for people who:

  • Just want their phone to be able to say "hey Claude, check on my training run"
  • Don't need agent teams, orchestration, or production features
  • Want to read 100 lines and understand everything

If that's you, read on. Otherwise, ⬆️ click the link above.

---

An OpenClaw plugin that intercepts messages prefixed with βš™οΈ and routes them directly into tmux via tmux send-keys. Pair it with a long-running Claude Code session (or aider, or your own REPL), and you can poke it from your phone while you're out for coffee.

---

πŸ’Έ The setup (why this exists)

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ OpenClaw             β”‚        β”‚ tmux session "dev"           β”‚
β”‚ (routing + channels) β”‚        β”‚ Claude Code (--dangerously-  β”‚
β”‚                      β”‚   βš™οΈ   β”‚   skip-permissions)          β”‚
β”‚ Runs on cheap/free   │──────▢ β”‚                              β”‚
β”‚ models β€” just needs  β”‚        β”‚ Runs on your Max/Pro         β”‚
β”‚ to route, not think  β”‚        β”‚ subscription β€” does the      β”‚
β”‚                      │◀──push─│ actual work                  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–²β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
           β”‚                                   β”‚
           β”‚  βš™οΈdev:fix the failing test       β”‚  replies via
           β”‚                                   β”‚  openclaw message send
           β”‚                                   β–Ό
           └──────────── your phone β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                       (WeChat / Telegram / …)

What you get:

  • OpenClaw handles chat channels, mailbox polling, cron reminders, email triage β€” cheap-model territory, model doesn't need to be smart, just has to route.
  • Claude Code in tmux does the real dev work β€” your subscription is fully utilized, nothing wasted.
  • This plugin (βš™οΈ prefix, ~100 lines) bridges them. Inbound: βš™οΈdev:<task> β†’ keystrokes into Claude Code's stdin. Outbound: Claude Code pushes replies through OpenClaw's outbound API.

---

How it works

phone/desktop chat app
        β”‚  user sends:  βš™οΈmybox:what's the training loss?
        β–Ό
OpenClaw gateway  ──[before_dispatch hook]──▢  claude-max-for-openclaw plugin
                                                       β”‚
                                                       β”œβ”€ strips βš™οΈ prefix
                                                       β”œβ”€ parses session + body
                                                       └─ tmux send-keys -t mybox -l -- "[weixin] what's the training loss?"
                                                                β”‚
                                                                β–Ό
                                                     tmux session "mybox"
                                                     (Claude Code / agent / human reads stdin)
                                                                β”‚
                                                                β–Ό
                                                     agent replies via chat channel's outbound API
                                                                β”‚
                                                                β–Ό
                                                        user's phone chat

Key properties:

  • Zero-token routing. The before_dispatch hook short-circuits the normal LLM dispatch and replies directly.
  • Channel tag preserved. When dispatching to tmux, the message is prefixed with [<channel>] (e.g. [weixin], [telegram]) so the receiver can tell where the question came from.
  • Reply is out-of-band. The plugin only handles inbound. The receiver (your agent) uses the channel's own outbound API to reply β€” otherwise stdout never makes it back to your phone.

Install

1. Clone into your OpenClaw extensions directory (the plugin's internal id is tmux-passthrough):

   cd ~/.openclaw/extensions/
   git clone https://github.com/Enderfga/claude-max-for-openclaw.git tmux-passthrough

2. Register in ~/.openclaw/openclaw.json:

   {
     "plugins": {
       "entries": {
         "tmux-passthrough": { "enabled": true }
       },
       "allow": [
         "tmux-passthrough"
       ]
     }
   }

3. Restart the OpenClaw gateway:

   # macOS (launchd)
   launchctl kickstart -k gui/$(id -u)/ai.openclaw.gateway

   # or whatever your platform uses

4. Verify the plugin loaded β€” the gateway log should show it in the ready line:

   [gateway] ready (N plugins: ..., tmux-passthrough, ...)

5. Start your Claude Code session in a named tmux window with bypass permissions:

   tmux new -s dev
   claude --dangerously-skip-permissions

Usage

Send these from any chat channel OpenClaw is connected to:

| Message | Effect | |---------|--------| | βš™οΈls | List tmux sessions. Reply goes back to the same chat channel. | | βš™οΈls -a / βš™οΈinfo | Full tmux info output. | | βš™οΈhelp / βš™οΈ? | Show help. | | βš™οΈ<session>:<message> | Inject [<channel>] <message> into session. Colon separator. | | βš™οΈ<session> <message> | Same, space separator. |

Examples:

βš™οΈls
β†’ βš™οΈ tmux sessions:
  dev: 1 win, attached, last=...
  worker-1: 1 win, detached, last=...

βš™οΈdev:what's the training loss right now?
β†’ βš™οΈ Delivered to session "dev". Reply will come through weixin's outbound channel.
β†’ (a moment later, your Claude Code in "dev" reads "[weixin] what's the training loss right now?"
   from stdin, checks the logs, and pushes a reply back via openclaw message send)

πŸ’Œ The reply pattern

The plugin only handles one direction. If the thing inside your tmux session wants to answer you, it needs to call your chat channel's outbound API itself.

Why it's designed this way: stdout inside tmux does not route to your chat channel. Even if the agent types "the loss is 0.21", that just lands in its own terminal β€” your phone will never see it. The agent must explicitly push.

Example: teaching an agent to reply

Tell your agent (via its system prompt, CLAUDE.md, skill, etc.) something like:

> When you receive a message starting with [<channel>] (e.g. [weixin] ..., [telegram] ...), the user is messaging you remotely from that channel. They cannot see tmux stdout. You must reply using that channel's outbound API. > > For channel weixin (OpenClaw): > ``bash > openclaw message send \ > --channel openclaw-weixin \ > --account <YOUR_ACCOUNT_ID> \ > -t "<YOUR_RECIPIENT_ID>" \ > -m "the loss is 0.21, still converging" > ` > > For channel telegram: > `bash > openclaw message send --channel telegram -t "<chat_id>" -m "..." > `` > > Keep replies short β€” the user is reading on their phone.

See examples/claude-code-skill.md for a drop-in Claude Code skill template.

Channel label

The plugin extracts a short label from the gateway's channel name:

| Gateway channel | Label used in prefix | |-----------------|---------------------| | openclaw-weixin | weixin | | openclaw-whatsapp | whatsapp | | telegram-bot:1234 | telegram | | discord | discord | | (unknown / empty) | inbound |

Security considerations

⚠️ This plugin is a remote-code-execution vector by design. Anyone who can send a message to a channel OpenClaw is listening on can inject keystrokes into your tmux sessions.

Before enabling:

  • Treat every chat channel like a shell prompt on your laptop.
  • Lock down your OpenClaw channels to trusted accounts only (per-channel ACLs are a gateway concern, not this plugin's).
  • Don't paste secrets into βš™οΈsession:msg β€” they go verbatim into the session.
  • If you run Claude Code with --dangerously-skip-permissions, remember that βš™οΈ now gives your phone the same bypass. Worth it for convenience, but know what you signed up for.

Requirements

  • OpenClaw gateway (any version with the before_dispatch hook β€” 2026.3+).
  • tmux installed and on PATH.
  • One or more chat channels wired into OpenClaw (WeChat, WhatsApp, Telegram, Discord, Slack, …).

No other runtime deps β€” pure Node.js node:child_process.

Status

This is a one-shot release. I'm not maintaining it.

It's ~100 lines, MIT-licensed, and simple enough that forking is trivial. If you want features, fork it. If you want something production-grade, go to openclaw-claude-code β€” that's the serious project.

License

MIT β€” see LICENSE.

---

TL;DR

  • Weekend hack? You're in the right place. Read the 100 lines, install, have fun.
  • Doing real work with Claude Code + OpenClaw? β†’ Enderfga/openclaw-claude-code is the project you actually want.

Related plugins

Browse all β†’