v0.10.0 Agent hooks, reboot-safe session restore, pane mode, Rex bridge, Windows SSH

A workspace engine for local and remote coding agents.

One Go binary and local daemon for parallel AI-assisted development: isolated Git worktrees and plain folders, tmux and Rex sessions, live coding-agent status and reboot-safe conversation recovery (Claude Code, Codex, Antigravity), safe pull-request checkouts, and reviewed OpenSSH connections across machines. Use the built-in dashboard and JSON CLI directly, or embed it in front ends and Go tools.

The kwt dashboard listing six worktrees across the widget and router repositories, with columns for repo, branch, changes, heads, activity, and workspace. fix/flaky-status has one modified and two untracked files and is one commit ahead; feature/new-ui has a live workspace; contrib/pr-17 is two commits behind.
Homebrew brew install kenn-io/tap/kwt
Go go install go.kenn.io/kwt/cmd/kwt@latest
In any repo kwt

Single Go binary. Prebuilt macOS, Linux, and Windows archives with checksums are on GitHub Releases. Needs Git 2.20+ and tmux 2.1+ (tmux 3.0+ for pane mode and conversation restore). See all install options.

Workspaces across branches, folders, and PRs

Run parallel branches and coding agents without them editing the same files. kwt creates isolated Git worktrees, handles bare-container repositories, registers plain non-Git folders as workspaces, and lists every project in one live dashboard.

One repository fans out into isolated worktrees, each with its own branch, tmux session, and agent, and one dashboard lists them all
Workspaces run on kwt's own tmux server (tmux -L kwt), separate from personal sessions. Imported pull requests stay inert until you review and attach.

Agent sessions that survive reboots

Install kwt's hooks once to track live agent status across tmux panes. When a machine reboots or tmux crashes, kwt session restore rebuilds your windows, pane layouts, and running Claude Code, Codex, and Antigravity CLI (agy) conversations.

$ kwt agent-hook install --dry-run
claude  ~/.claude/settings.json      would install
codex   ~/.codex/hooks.json          would install
agy     ~/.gemini/settings.json      would install
$ kwt agent-hook install

# after a reboot or tmux kill-server:
$ kwt session restore --all --continue
restored  kwt-wt-widget-fix-flaky-status  (2 windows, 3 panes, resumed codex + claude)

Status badges

kwt agent-hook install

Writes working, approval, input, or done onto each pane so terminal front ends flag sessions that need you. Preview config edits first with --dry-run.

Reboot recovery

kwt session restore

Rebuilds saved tmux windows, pane geometry, working directories, and Claude Code, Codex, or agy conversations. Without hooks, run kwt session snapshot while tmux and the agents are running so kwt records their panes before shutdown.

Resume mid-turn

--continue

Asks Codex and Claude Code to pick up turns interrupted when tmux stopped, skipping turns that were waiting for your approval or input.

Rex bridge

kwt rex

Lists Rex terminals, attaches from an ordinary terminal, opens new windows, and controls tiled splits and floating layers locally or over REX_SERVER.

Remote hosts and multi-machine visibility

Workspaces often live on build boxes, dev servers, and laptops at the same time. kwt resolves OpenSSH configuration into reviewed routes, holds generation-bound connection leases, browses remote folders, and syncs advisory worktree state across machines.

$ kwt ssh resolve build.example.com --json
$ kwt ssh lease build.example.com --host-key-policy review --connection 2 --json
connected  route verified · master #2 leased · prompts streamed as NDJSON

$ kwt ssh exec build.example.com -- kwt list --json
$ kwt sync status
widget  fix/flaky-status   laptop (clean) · build-box (ahead 2, modified 1)

Reviewed routes

kwt ssh resolve and lease

Resolves ssh -G routes with direct and ProxyJump hops, streams structured host-key review and Tailscale SSH browser-auth prompts, and runs ssh exec and ssh copy.

Scale and Windows

Pooled and masterless leases

Pass --connection 1..15 to open extra masters past server MaxSessions limits, override --compression or --forward-agent, and lease connections on native Win32-OpenSSH without WSL.

Fleet awareness

kwt sync

Runs a loopback hub (kwt sync serve) that you expose over private HTTPS so the dashboard shows remote-only branches, differing commits, and where dirty files were last seen across your machines.

Remote discovery

kwt workspace browse

Lists child folders and Git roots on local or SSH-hosted machines as JSON without registering anything, so front ends can pick projects on remote hosts safely.

JSON automation and safety boundaries

Scripts and agents drive every operation over JSON with structured error codes and generation checks. Untrusted branches and contributor pull requests start inert: hooks, filters, file copies, setup commands, and tmux stay off until you review and open them.

$ kwt add -b fix/flaky-status --no-launch
$ kwt exec fix/flaky-status -- go test ./internal/status
ok      go.kenn.io/kwt/internal/status  1.204s

$ kwt changes "$(kwt get fix/flaky-status)" --json
{
  "worktree": { "repository": "github.com/acme/widget", "generation": "9f3c…" },
  "changes":  { "state": "modified", "summary": { "modified": 1, "untracked": 0 },
                "files": [{ "path": "internal/status/poll.go", "worktree": "modified" }] }
}

$ kwt remove -b fix/flaky-status
removal stopped: the worktree has local changes  # commit first, or pass --force
A worktree created from an existing branch or pull request starts inert with no hooks, setup, copied files, or tmux; a person reviews it with kwt changes; only an explicit open or protected attach starts the workspace

Generation-checked JSON

kwt list and kwt changes

Every worktree carries a generation ID that changes if the path is recreated. Guard reads and mutations with --expected-generation and branch on structured error codes.

Pull requests

kwt pr import and attach

Imports a GitHub PR into an inert checkout wired to push back to the contributor's branch. kwt pr attach runs it on a dedicated tmux socket and strips kwt-managed credentials.

Safe cleanup

kwt remove and kwt prune

Stops when a checkout is dirty, locked by Git (printing Git's lock reason and unlock command), or in use by a live shell or agent (listing blocking PIDs). Preview policies with --dry-run.

Self-repair

kwt doctor --fix

Detects broken Git backlinks, moved repositories, and registry drift without changing anything. --fix applies only unambiguous repairs and rescans.

One daemon, four ways in

An on-demand local daemon coordinates inventory, cross-process locks, repository trust, and SSH leases on each machine. Ghosthub embeds kwt as its workspace backend across local and SSH hosts, and any script, editor, or Go app can build on the same interfaces.

  • Terminal dashboardkwt or kwt tui. Manage every local repo, folder workspace, and remote fleet host.
  • JSON CLIStable schemas, error envelopes, and exit codes for agents, editors, and shell scripts.
  • Go packagesgo.kenn.io/kwt for inventory, removal, inspection, and SSH; go.kenn.io/kwt/worktree for locked Git worktrees and warm spares.
  • Terminal and SSH endpointskwt open --start-session, kwt rex control, and kwt ssh lease --json for custom front ends.
The dashboard, CLI, Go package, tmux session endpoint, SSH routes, and embedding applications such as Ghosthub all share one kwt daemon and its registry under KWT_HOME

Get started

Follow the 10-step guide from registering a project to restoring agent sessions, leasing SSH routes, and embedding kwt. Every documentation page is also served as Markdown with a .md URL and indexed in llms.txt.

Expanded documentation capture