Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: LAN discovery, pairing and admin tests
run: cargo test --locked --test lan --test lan_messaging --test admin_messaging --test shell_daemon --test update --test remote --test spawn --test usage --test codex_wake
- name: Store, page and phone tests
run: cargo test --locked --test attachments --test channel --test editing --test issues --test phone --test phone_plain --test requirements --test trace --test workflow --test working_on
run: cargo test --locked --test attachments --test channel --test editing --test issues --test phone --test phone_plain --test requirements --test trace --test workflow --test working_on --test codex_remote
ui:
# The admin page end to end (qa/, headless Chrome, a test bridge with
# stand-in agents). Observe mode: it reports but does not block yet; the
Expand Down
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,25 @@ User-facing changes to session-bridge. Newest first. Each version lists

## Unreleased

### Changes

- Never kill root: the bridge no longer closes or restarts the session that
holds root, from the admin page, `session-bridge close`, or another session's
`close_session`; each says "<name> holds root; the bridge does not close or
restart it". The Projects tab and the conversation header show no Close or
Restart for it, `list_sessions` marks it with `holds_root`, and the bridge's
instructions tell agents never to end its process. To end it, give the
session another role first, or close it in its own terminal.

### Fixes

- A Codex session the bridge starts on your Codex app server, by you or by
an agent, carries the name the start returned and acts in its role, root
included, from its first request. Two starts in one folder get their own
names and roles. Closing or restarting it ends only its own terminal
client, never the shared app server or other sessions. If the app server
cannot create the session's conversation, the start fails with the reason
in its window.
- Starting a session on macOS no longer brings Terminal or iTerm2 to the
front: the new window or tab opens while you keep working where you were,
and in iTerm2 the tab you were looking at stays selected. One exception:
Expand Down
35 changes: 23 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -410,8 +410,15 @@ A session's waiting list (**N waiting**) lets you remove a message that has
not been read yet: from the bridge, or from a Codex session's own queue.

A session's **Close session** button (local sessions only) ends its process
after you confirm. A Codex session that runs inside a shared Codex app server
is not closed this way; close it in its terminal. From a shell:
after you confirm. For a Codex session the bridge started on your Codex app
server, that is its own terminal client: a running turn is stopped first,
the app server and its other sessions keep running, and the session leaves
the list at once. A Codex session in the app server that the bridge did not
start is not closed this way; close it in its terminal. A session that holds root
has no Close button and is never closed by the bridge, on any path; the
answer is `<name> holds root; the bridge does not close or restart it`. End
it in its own terminal, or give root to another session and another role
(or none) to this one, and then close it. From a shell:
`session-bridge spawn <claude|codex> <role> [--project <name-or-path>]
[--model <model>] [--effort <effort>]` and `session-bridge close <session_id>`.

Expand All @@ -423,18 +430,15 @@ Only you assign root or start a root session; you can edit root's
instructions on the Roles tab but not rename or delete it. Root's own project
is its directory, not just a folder of the same name elsewhere. Root acts only
through the session you gave it (or the session started as root): another
session that takes the same name gets no root powers. Any program of your
account can still run `session-bridge spawn` and `close`, and the control
session that takes the same name gets no root powers and no protection from
a close. Any program of your account can still run `session-bridge spawn`
and `close` (a session that holds root is refused there too), and the control
socket does not prove which session is calling (only a started session's
claim is checked: it must come from its own launch process, on macOS and
Linux), and whoever runs a launch chooses the `claude` or `codex` program it
starts, so root is a convenience for coordinating agents, not a security
boundary.

Known issue: Codex sessions the bridge starts on the Codex app server keep
Codex's own title and cannot be closed or restarted from the bridge yet;
close them in their terminal (#82).

The **Projects** tab shows this laptop's projects (directories with live
sessions, and every existing, non-temporary directory the bridge knew a
session in before, so a project stays after its sessions end) with their sessions, roles and coordinator,
Expand Down Expand Up @@ -489,9 +493,13 @@ role's default; a value that came from the old role's defaults is not kept.
What a session was started with is kept in
`~/.session-bridge/launches.json` for 30 days after it was last seen; a
session started before restarts existed, or not by the bridge, says it has no
launch record and cannot be restarted. Sessions sharing a process or running
in the Codex app server, and a paired laptop's sessions, are restarted where
they run. Only the admin page restarts sessions.
launch record and cannot be restarted. A Codex session the bridge started on
your Codex app server restarts in a new terminal client that continues the
same conversation. Sessions sharing a process, Codex sessions in the app
server that the bridge did not start, and a paired laptop's sessions are
restarted where they run. A session that holds root is not restarted by the bridge: it has
no Restart action, and a request answers `<name> holds root; the bridge does
not close or restart it`. Only the admin page restarts sessions.

## Issues

Expand Down Expand Up @@ -692,6 +700,9 @@ The CLI derives sender identity from `CODEX_THREAD_ID`,
`CLAUDE_CODE_SESSION_ID`, or its Claude ancestor. A human shell without an agent
identity can list/status but cannot silently impersonate a sender.

Never end a root session's process (no kill, no closing its terminal); the
bridge refuses to close or restart it.

### Command reference

| Command | Purpose |
Expand All @@ -706,7 +717,7 @@ identity can list/status but cannot silently impersonate a sender.
| `session-bridge status` | Show the service state and recent messages |
| `session-bridge send <session_id> <message> [--project <name-or-path>]` | Send from an agent's shell tool |
| `session-bridge spawn <claude\|codex> <role> [--project <name-or-path>] [--model <model>] [--effort <effort>]` | Start a session with a role in a terminal |
| `session-bridge close <session_id>` | End a local session's process |
| `session-bridge close <session_id>` | End a local session's process (refused for a session that holds root) |
| `session-bridge network on [--port <n>] [--name <host>]` / `network off` | Announce this laptop on the local network and accept paired bridges |
| `session-bridge discover` | Bridges found on the network, paired or not |
| `session-bridge pair <host>` | Pair with a discovered laptop; type the code it shows |
Expand Down
Loading
Loading