Repository navigation
One session across devices: remote control for OpenSRE #5670
Replies: 1 comment
|
Disclosure up front, I work on Pilot Protocol, which develops shell.online, so weigh this accordingly. Prior art for the behaviour in your first paragraph, usable today while the native version is designed: Two notes from running it that map onto your gaps. There is no second transport to arbitrate, both devices are the same PTY, so nothing like Happy to compare notes if it helps the native design. |
Uh oh!
There was an error while loading. Please reload this page.
The idea
One OpenSRE session, live on every device you use.
Start an investigation on your laptop. Walk away. Open your phone and the same
session is there — same history, same running loop, still going. Type into it and
the laptop sees your message. Close the laptop and nothing is lost.
Claude Code does this today. The terminal shows a banner:
The load-bearing word is continue. Not a notification feed, not a read-only
mirror, not a second app — the same session, reachable from wherever you are,
and it keeps going while you move between surfaces.
Why this matters for OpenSRE specifically
The concrete case: a scheduled loop runs after a release. You are on a train. You
want to know what it found, and if it is stuck waiting on you, you want to
unstick it.
But the train case is just the visible instance. The general problem is that an
OpenSRE session is currently bound to the terminal that started it. An
investigation running on your laptop is invisible from anywhere else, and a
conversation you had on your phone is a different conversation from the one on
your desk. For a tool whose whole job is watching production, being reachable
from one machine is a real constraint.
OpenSRE is closer to this than it looks
Three things had to be true before one session could span devices. All three
already are:
infrastructure/turn_host/turn_runner.py. A turn is a turn regardless of where it entered./resume <session-id-prefix>exists in the shell today.gateway/core/storage/session/resolver.pyalready adopts a session id for a chat id and injects chat context.SessionAgentPoolserializes same-session turns; an overlapping dispatch raisesAgentBusyError. This is exactly the primitive two devices need.Plus the surfaces that reach a phone are built — Slack, Telegram, Discord and
Buzz under
gateway/transports/— and the outbound push path exists(
tools/system/watch_dog/dispatches with a cooldown).So this is not a new subsystem. It is one session bound to more than one
transport at a time, plus a way to discover and claim it from a second device.
The three honest gaps
1. Handoff and discovery. Claude Code's banner does real work: it announces
that the session is reachable and gives you the address. OpenSRE has no
equivalent — no way for a session to say "I am reachable at X", and no way for a
second device to claim it. This is the actual missing feature, and it is small
compared to what it unlocks.
2. Two processes, one session file. This is the blocker. Two devices on one
session means two processes writing the same session JSONL concurrently. That
path is not safe today: opening a session truncates an existing file, and a
contended write is dropped silently. Both are tracked and fixable.
Say it plainly: session sync cannot ship before the session store is safe
across processes. Otherwise the failure mode is losing the conversation you
switched devices to read — the exact opposite of the feature.
3. Convergence, not just access. Two devices reading one file is not the same
as two devices agreeing. If the phone sends a message while the laptop is
mid-turn,
AgentBusyErrorcovers the collision, but the laptop still needs tolearn that a turn it did not start has happened. Live update — not just
correct-on-next-read — is a design question this discussion should answer.
The part worth arguing about
Reading and continuing a session from a second device is uncontroversial.
Approving a production action from one is a different feature wearing the same
coat.
The resolver already knows "this chat id owns this session". That is not the same
claim as "this person may restart production", and an approval that reaches a
phone can be answered by whoever holds an unlocked phone in a chat thread.
A reasonable split: sync and continuity first, approvals as their own decision
with their own thread.
Questions this discussion is for
or is it enough that a second device can pick the session up when the first one
is idle? The first needs a push channel; the second may need nothing new.
slash command in a channel you already have, or automatic binding for a known
actor? This is the decision the rest hangs off.
so far, token spend — or just "running / done / waiting on you"? The last is
dramatically cheaper and may cover the train case entirely.
AgentBusyErroralready refuses thesecond turn. Is refusing right, or should it queue?
run, approving a gated action, starting a new loop — five escalating levels of
trust. Where is the line, and what proves identity at each?
unreachable for six hours — wait, time out, or proceed? This exists today;
multi-device makes it sharper, not softer.
What would help most
Concrete stories rather than agreement. If you have run an OpenSRE session and
then wanted it somewhere else — a different machine, a phone, a shared screen —
what did you want to see, and what would you have wanted to do about it?
If you have views on the identity question specifically, say so. That is the part
most likely to decide the shape of the whole thing.
All reactions