Open many terminals at once, and run a program in one - #69
Merged
Merged
Conversation
One terminal at a time, at the bottom of the window, is not how the work looks. The work is several terminals open together — one per task — and in some of them an agent CLI doing a job. There is a board now. A window opens in a sandbox you choose, and it moves, resizes, raises, closes and tidies into columns. Each window states the terminal, the sandbox, the working directory and the policy that governs it. Positions and sizes are kept on this machine, so the board comes back as you left it. Typing a program's name opens a session in that window. `claude`, `codex`, `qwen` and `agentctl` are objects in the engine — `domain::TerminalProgram` — each naming the model and provider it would use, the banner it prints, example tasks, and the reason its real binary cannot be launched. A test asserts `available` and `blocked_by` are opposites, so a program can never claim to run without saying what is missing. None of them runs. A program in a sandbox runs as the sandbox user, which is workbenchd's work, and for a hosted model the provider is not connected either. What opens is a session against the built-in inspector under the read-only policy, and the banner says so on every start, not once and not in a tooltip. Inside the session every line is a task; `claude "a task"` answers once from its argument, the way the real CLI takes a first prompt; `exit` closes it. Every answer names the model, the tokens and the cost, as everywhere else. What a terminal does with what is typed moved out of the dock into `lib/terminal.ts`, and the buffers moved into the shell, keyed by terminal id. The panel and the board are now two views of the same terminals: a session started on the board is visible in the panel, the panel's session list includes the board's windows, and `clear` clears one history rather than one of two. Transcripts are deliberately not persisted. A session that outlived the window would be a session this app never had; a restored window opens at its shell prompt with its policy and claims nothing about what was said before. Closes #68
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change
One terminal at a time, docked at the bottom, is not what the work looks like. The work is several terminals open together — one per task — and in some of them an agent CLI doing a job.
A board of terminals. A window opens in a sandbox you pick, and it moves, resizes, raises, closes, and tidies into columns. Each window states its terminal, sandbox, working directory and policy. Positions and sizes are kept on this machine, so the board comes back as you left it.
Programs inside a terminal. Typing
claude,codex,qwenoragentctlopens a session in that window that takes a task per line untilexit.claude "a task"answers once from its argument, the way the real CLI takes a first prompt.domain::TerminalProgramholds each program: the model and provider it would use, its banner, example tasks, andblocked_by— the reason its real binary cannot be launched. A test assertsavailableandblocked_byare opposites, so a program can never claim to run without saying what is missing. Nothing here launches anything: a program in a sandbox runs as the sandbox user, which is the daemon's work, and the banner says so on every start rather than once.One terminal, one history. What a terminal does with what is typed moved out of the dock into
web/src/lib/terminal.ts, and the buffers moved into the shell, keyed by terminal id. The panel and the board are two views of the same terminals: a session started on the board shows in the panel, the panel's session list includes the board's windows, andclearclears one history rather than one of two.Transcripts are deliberately not persisted — a session that outlived the window would be a session this app never had. A restored window opens at its shell prompt with its policy and claims nothing about what was said before.
Validation
cargo test -p open-cube-core— 28 tests, one new: no program claims to run without saying what is missing, and every program's model and provider exist.pnpm fallback,pnpm buildclean.claudein one and gave it a task (output above), confirmed the second window kept its own shell and its own policy (network offforreview), opened the bottom panel and saw the same transcript with the session markedclaude session, reloaded and the board came back in place. Checked light and dark.Security impact
None. The session is the existing read-only inspector; no process is spawned, no provider is contacted, and the refusals are stated more often rather than less. Board state stored locally is positions and sandbox ids only.
Closes #68.