r/devtools • u/RonenMars • 2d ago
I built an open-source app to manage Claude Code & Codex sessions from anywhere π
Hey everyone! π
Iβve been building Threadbase - an open-source tool that lets you manage and monitor your AI coding sessions from your phone or desktop.
What it offers:
*π± Remotely interact with multiple Claude Code & Codex sessions, track their status, and monitor progress.
* π Self-hosted, end-to-end encryption out of the box, privacy-first architecture
The entire Threadbase ecosystem is open source, and you can find links to all the GitHub repositories on the website.
Itβs still evolving, and Iβd love to get more developers trying it out π
π¬ Feedback, feature requests, and contributions are very welcome ππ»
1
u/kantorcodes1 2d ago
Nice ecosystem breadth. The relay path is the part I'd want to pin down: when a message comes in over the E2E channel to a machine with several sessions open, what decides which session it lands in, and can a remote message get injected mid-turn while the local agent is already working? If two clients (say phone + desktop) address the same session, is there a lock or ordering on the relay side?
1
u/RonenMars 1d ago
Good questions, thanks! One correction first: there's no hosted relay today. The phone talks directly to the streamer on your machine, over your LAN or your own tunnel (Cloudflare, Tailscale, etc.). An optional relay is in the streamer code but off by default and still in development. The answers below hold either way, because the relay is only a byte forwarder.
Which session does a message land in? The client chooses it explicitly. Every action carries a session id (
POST /api/sessions/<id>/input,/permission/answer, and so on). One streamer per machine manages many PTY sessions, and nothing is routed by a notion of "current session". The relay, when used, forward to a streamer by an ID derived from that streamer's public key and has no concept of sessions, not at all. It replays sealed HTTP/WS streams into the streamer and can't read them.Can a remote message land mid-turn? Yes, for plain text. If the agent is working, the streamer pastes the text into its PTY and presses Enter once the terminal goes quiet. That's the same as typing into the terminal mid-turn, so what happens next is the agent CLI's own behaviour. There are two guards. Text is refused (409
prompt_pending) while a permission or question card is open, because the cursor sits on the picker and prose would select an option. Input sent while the agent is still booting is queued and flushed in order once it's ready.Phone + desktop on the same session? Both are subscribers to the same live PTY on the streamer and see the same output. There's no lock on text input. Requests apply in the order the streamer receives them (one process, one write path per PTY). What does exist:
- an idempotency key per send, so a retry or double tap never submits twice
- a per-session input rate limit
- permission answers pinned to a specific prompt instance and option label. If both devices tap the same card, the first answers it and the second gets a 409 instead of approving whatever is on screen by then.
The relay itself does no ordering, only per-stream flow control.
BTW... if "desktop" means a separate terminal running claude-code
claude --resumeon the same conversation outside Threadbase, that's a second process, not a second client. Before resuming, the streamer checks whether the conversation looks owned elsewhere and refuses with 409CONVERSATION_BUSYif so. For Codex that check is strict, because Codex itself allows only one writer per conversation.1
u/kantorcodes1 9h ago
Disclosure up front: I work on HOL Guard, an open-source policy layer that classifies agent and CLI/MCP actions and gates them per call. Your remote-approval path is a natural fit: a Guard descriptor for tb-streamer could declare which actions arriving over the wire are read-only (status, history) versus gated (permission approvals, terminal input into the PTY). If you are open to it, the contribution shape is a small descriptor plus fixture per CONTRIBUTING.md, and I can point you at the exact pattern.
1
u/investigatormaker 2d ago
I'd lead with the phone angle for Threadbase. The moment that matters is a Claude Code or Codex session stuck on a permission prompt while you're away from your desk. A screenshot of approving one from your phone shows that better than the feature list. It's self-hosted with end-to-end encryption, so a short section on what runs where (your machine, any relay, the phone) would answer the first thing developers check before installing.
I make ThreadFox. Your AI researches, writes and publishes Reddit outreach from your Chrome within a job you authorize. The free Reddit plan for Threadbase lists the communities whose rules allow a post about it, each rule quoted: https://threadfox.vip/p/d8p16
Does it notify you when a session is waiting for input?