Skip to content

feat: tern_run layouts, stacked question cards, and fixes for host/mount requests - #38

Merged
insertt merged 7 commits into
feat/shared-sandbox-worktreesfrom
feat/tern-tools-followups
Dec 2, 2026
Merged

insertt merged 7 commits into
feat/shared-sandbox-worktreesfrom
feat/tern-tools-followups

Conversation

@insertt

@insertt insertt commented Dec 2, 2026

Copy link
Copy Markdown
Owner

Stacked on #37; the base will move to main once that merges.

Includes a one-character clippy fix in src/panes.rs (map(&line) → map(line), needless_borrows_for_generic_args), folded into the tern_run layout commit, so CI passes with -D warnings.

fix: keep a failed host or mount request in its row, with the command to run on the host

When sand cannot ask on the host (no graphical session, no zenity or
kdialog), the row in Claude Code stays until dismissed and says exactly what
to run there: sand allow --name <sandbox> --host <host> or
sand mount --name <sandbox> <dir>:<mode>.

feat: lay out tern_run panes, list tab layouts, page tern_capture output

tern_run splits below (default) or right of sand's pane, or floats over it
in a chosen corner, also beside a pane an earlier command opened, and leaves
a login shell open after the command. tern_ls lists each tab's splits, pane
sizes and floats, and which panes tern_run opened. tern_capture takes lines
and offset to page through scrollback, 200 lines by default.

feat: stack several open questions as cards in sand's Tern pane

Questions asked at the same time each get their own card (or, minimized, an
icon in a tray above the cards) instead of replacing one another.

feat: ask questions not about access in the agent's own UI outside Tern

In a terminal other than Tern, sand's questions whose answer gives the agent
nothing (whether to update to a newer nightly image) are asked in a row above
Claude Code's prompt, through question.json in the policy directory, rather
than in the system dialog.

feat: reuse an idle float the agent opened for its next floating command

A floating tern_run reuses the latest float the agent opened over the same
pane once its command has ended, even when the user clicked into it, instead
of opening another.

fix: offer a blocked host only when sbx logged blocking it

A tool's output that merely names a host in the proxy's 403 wording (a file,
a web page, sand's own source) raised a block notification although no
request was made. The mod and the native client now ask the bridge which of
the hosts sbx blocked in the last 30 minutes before showing any, and keep
every host when sand cannot answer.


Checked locally on stable Rust: cargo fmt --check, cargo clippy --all-targets --locked (with -D warnings) and cargo test --locked pass.

@insertt
insertt force-pushed the feat/tern-tools-followups branch 2 times, most recently from 140814c to 7bcff7e Compare December 2, 2026 18:45
@insertt
insertt force-pushed the feat/tern-tools-followups branch from 7bcff7e to d959e01 Compare December 2, 2026 19:11
@insertt
insertt added this pull request to stack #39 December 2, 2026 19:38
… to run on the host

When sand cannot ask on the host (no graphical session, no zenity or
kdialog), the row in Claude Code stays until dismissed and says exactly what
to run there: `sand allow --name <sandbox> --host <host>` or
`sand mount --name <sandbox> <dir>:<mode>`.
tern_run splits below (default) or right of sand's pane, or floats over it
in a chosen corner, also beside a pane an earlier command opened, and leaves
a login shell open after the command. tern_ls lists each tab's splits, pane
sizes and floats, and which panes tern_run opened. tern_capture takes lines
and offset to page through scrollback, 200 lines by default.
Questions asked at the same time each get their own card (or, minimized, an
icon in a tray above the cards) instead of replacing one another.
In a terminal other than Tern, sand's questions whose answer gives the agent
nothing (whether to update to a newer nightly image) are asked in a row above
Claude Code's prompt, through question.json in the policy directory, rather
than in the system dialog.
A floating tern_run reuses the latest float the agent opened over the same
pane once its command has ended, even when the user clicked into it, instead
of opening another.
A tool's output that merely names a host in the proxy's 403 wording (a file,
a web page, sand's own source) raised a block notification although no
request was made. The mod and the native client now ask the bridge which of
the hosts sbx blocked in the last 30 minutes before showing any, and keep
every host when sand cannot answer.
The worker canonicalizes its temporary directory, which on macOS resolves /var to /private/var, so comparing with the raw tempdir path failed there.
@insertt
insertt force-pushed the feat/tern-tools-followups branch from d959e01 to a885917 Compare December 2, 2026 20:30
@insertt
insertt merged commit 10e0ece into main Dec 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant