rysh for VS Code
See the panes of the rysh sessions in your workspace from VS Code, see which agent
needs you, open a pane, and hand an agent a file or a selection.
It talks only to the local rysh program and sends nothing over the network itself. A line
you send to an agent pane is handled by that agent, as if you had typed it there.
What it does
- Sessions view (rysh icon in the activity bar): each session in the workspace
folder (
rysh list-sessions, run in that folder), then its tabs and panes. Each pane
shows its kind (claude, codex, shell, rysh-agent, …) and state (working, idle,
needs you with the reason, e.g. an approval).
- Needs you: a status-bar item
rysh: N need you, and a notification when a pane
starts needing you, with an Open button. Turn the notification off with
rysh.notify. The extension reads pane states only while the rysh view is visible or
a pane terminal is open; otherwise it polls nothing, so the count and the notification
update only then.
- Open Pane in Terminal: a terminal tab that mirrors the pane's screen and has one
input line. Enter sends the line to the pane. It is a mirror, not a PTY: arrow keys and
other raw keys are not forwarded. A multi-line paste is sent one line at a time, and
each line passes the policy gate on its own.
- Attach Session in Terminal: a real terminal running
rysh attach <session>, the
full TUI.
- Send Selection / Send File to Agent Pane (editor and explorer context menus): pick
a pane, optionally type an instruction, and the pane receives one line, e.g.
review this — see src/a.ts:10-20. It sends the path and line range, not the text:
the agent shares the workspace and reads the file itself.
Governance
- Read-only by default. Sending needs
rysh.allowWrite: true. The extension then
starts rysh mcp serve --allow-write.
- A workspace cannot change what runs.
rysh.path and rysh.allowWrite are
machine-scoped, so they come from your user settings only. A cloned repo's
.vscode/settings.json cannot point the extension at another binary or switch writes
on. In an untrusted workspace both are also restricted settings.
- The extension does not activate at startup. It starts when you open the rysh view or
run one of its commands.
- A session whose name starts with
- is refused, so it is never passed as a flag.
- Every send passes the session's policy gate in the daemon. A gated send is refused and
the refusal is shown; it is never auto-approved or retried.
rysh mcp serve never exposes the session's stored secrets (##secret/##var
contents), pane env or histories. The mirror shows a pane's screen as you would see it
in rysh.
Requirements
The rysh program, v0.2.12 or later, installed separately (see https://rysh.ai). With an older build, the sessions view says so on each session.
Settings
| Setting |
Default |
|
rysh.path |
rysh |
the binary to run (user settings only) |
rysh.allowWrite |
false |
allow sending input to panes (user settings only) |
rysh.pollSeconds |
3 |
refresh interval while the view is visible or a pane terminal is open (0 = manual only) |
rysh.notify |
true |
notify when a pane starts needing you |
How it works
rysh list-sessions (run with the folder as cwd) lists the sessions.
- For each live session, one child
rysh mcp serve --session <name> speaks JSON-RPC on
stdio, one object per line. The extension uses three of its tools:
list_panes for the tree and the needs-you state;
read_pane for the mirror terminal;
send_input for sending.
- There is no new daemon or server API.
Licence
The rysh for VS Code End User Licence Agreement (LICENSE.txt). Contact: info@rysh.ai.
| |