Skip to content

S05 - Command Line Interface

Purpose: Specify wb, the single user-facing command.

Requirements: FR01-drop-inFR01-drop-in: Drop-in for claudewb is the single entry point for everything, structured as wb [wb flags] <command> [command args]. to FR05-parallel-sessionsFR05-parallel-sessions: Parallel sessionsSeveral sessions can run at once, in the same project and across projects., FR09-approve-unknownFR09-approve-unknown: Approve unknown destinationsA request to an unknown destination is blocked and offered to the user for approval out-of-band (allow once, allow for project, deny)., FR12-clipboardFR12-clipboard: Opt-in clipboardText clipboard sharing is opt-in, per direction, with approval., FR13-claude-stateFR13-claude-state: Claude Code state per projectClaude Code's conversation history, and the state it keeps only in the guest, persist per project, so --resume/--continue work within a project. to FR17-same-everywhereFR17-same-everywhere: Same on every hostThe same wb commands, flags, policy files, and behavior on every host OS., SEC03-no-host-execSEC03-no-host-exec: No host code execution via returned workNothing the agent produces executes on the host without an explicit user action; returned changes to files the host may later execute are flagged., SEC10-auditSEC10-audit: AuditEvery egress decision, approval, and returned change is recorded on the host in a persisted log the guest cannot alter., SEC14-no-fake-approvalsSEC14-no-fake-approvals: Approvals cannot be spoofed by the guestApproval prompts are never rendered in the agent's terminal stream., NFR01-startupNFR01-startup: StartupGoals: a warm VM reaches the Claude prompt in about 4 s and a suspended VM in about 7 s, and no start takes more than 10 s (p95), excluding first-time project setup and the first boot after a host restart., NFR06-explained-refusalsNFR06-explained-refusals: OperabilityEvery refusal names the rule that caused it and how to change it..

Tests: C04-projectsC04-projects: ProjectsThe test cases for project identity: which repository a session belongs to, what happens when a repository moves, is cloned again or changes its remote, and the project commands.

Briefs: B37-terminal-boundaryB37-terminal-boundary: Should the host terminal be a trust boundary with its own filter?Yes, decided., B42-trust-placementB42-trust-placement: Where does a new project run, and what makes it the same project later?Split "trusted" into two named settings, start new projects in the isolated VM until the user moves them, and key project identity on the git directory rather than the remote URL., B46-session-lifecycleB46-session-lifecycle: What happens to a running session when its terminal closes or its VM stops?Recommended that closing the terminal detaches an interactive session, which `wb attach` resumes, that a session ends only when claude exits, and that `wb` exits 255 when it loses a session.

wb [wb flags] <command> [command args]

wb is a dispatcher in the style of gh or git. Every capability is a subcommand of the one binary. There is no second CLI.

Flag Meaning
-C <dir> Act as if wb was started in <dir>
--help, -h Help
--version Version
Page What it covers
S05-01-agent-commandsS05-01-agent-commands: Agent CommandsHow wb claude passes its arguments to Claude Code, how it runs interactive and non-interactive sessions, and what a session does. wb claude: arguments, interactive use, session flags and session behavior
S05-02-exit-status-and-signalsS05-02-exit-status-and-signals: Exit Status and SignalsWhat wb claude exits with, and what it does with each signal. What wb claude exits with, and which signals it forwards
S05-03-management-commandsS05-03-management-commands: Management CommandsThe commands of wb other than the agent commands. Every other command of wb
S05-04-namingS05-04-naming: NamingHow wb identifies a project, a session and its branch, and how projects are registered, checked, moved and removed. Project keys, ids, recorded identity, registration, moving and removing projects

The guest output that wb claude and wb shell write passes an allowlist filter in wb. That is boundary 6 of T00-indexT00-indexboundary 6 is the host terminal stream. (SEC03-no-host-execSEC03-no-host-exec: No host code execution via returned workNothing the agent produces executes on the host without an explicit user action; returned changes to files the host may later execute are flagged.). S16-terminal-streamS16-terminal-stream: Terminal StreamHow wb guards boundary 6 of T00-index, the guest output that wb writes to the user's terminal. specifies the filter, and everything else wb does at that boundary.

The filter and wb treat the stream this way:

wb diff, logs and audit records show control sequences in guest text escaped, where a reviewer sees them. Other output outside the stream removes them.

Inside a WSL 2 distribution on a Windows host, wb runs in client mode (FR16-wslFR16-wsl: WSL on WindowsOn a Windows host, wb run inside a WSL 2 distribution works on repositories in that distribution, using the VMs and services of the Windows host., S12-platformsS12-platforms: PlatformsWhich host and guest operating systems Wraith Box targets, how platform-specific code is isolated, what each platform uses, and how wb works inside WSL.). It has the same commands and flags, served by the Windows host’s wb-hostd.

  • The repository, the terminal and wb land are on the WSL side.
  • VMs, policy, credentials and audit are on the Windows side.

Guest output that reaches the user’s terminal passes an allowlist filter in wb (S16-terminal-streamS16-terminal-stream: Terminal StreamHow wb guards boundary 6 of T00-index, the guest output that wb writes to the user's terminal.). The allowlist is the one measured in X19-terminal-filterX19-terminal-filter: Terminal stream filteringWhich terminal escape sequences does Claude Code emit, and can wb drop the ones that act on the host (clipboard writes, file transfer, terminal multiplexer control sequences) without visible damage in the common macOS…, tightened as the security review of PR66PR66 (merged): docs(spikes): X19-terminal-filter result, yes with conditionsAnswer: yes, with conditions, for Ghostty and Terminal.app, as far as a headless emulator can show. asked.

Escape guest text outside the stream, don’t strip it

Section titled “Escape guest text outside the stream, don’t strip it”

wb diff, logs and audit records show control sequences escaped. Other output still removes them.

wb resets the terminal on exit (S16-03-around-the-streamS16-03-around-the-stream: Around the StreamWhat wb writes to the terminal around the filtered stream, the terminal environment the guest gets, and how guest text in wb's other output is escaped., “Reset on exit”).

A stream that goes to a pipe or a file passes the same full filter as terminal output (S16-01-filterS16-01-filter: FilterWhere wb filters guest output, how the filter splits it into tokens, and the allowlist of what passes., “Where”).

Status: Draft