GitGuardex cockpit gives one terminal workspace for launching and inspecting multiple guarded agent lanes. It borrows the practical shape of a dmux-style control surface, but it is not a dmux clone. GitGuardex keeps safety as the core and adds orchestration around the existing branch, worktree, lock, and PR finish model.
Each task gets its own agent/* branch and worktree. The cockpit and
gx agents ... commands are control surfaces over those lanes:
- Start a lane with
gx agents start. - Inspect status, changed files, locks, and diffs.
- Let the agent work inside its sandbox.
- Finish through the PR-only merge and cleanup flow.
The base checkout stays protected. Agents do not work directly on
main, dev, or master.
gx cockpitBy default this creates or reuses a tmux session named guardex in the
repo root and opens a control pane running:
gx cockpit control --target <repo>Useful variants:
gx cockpit --session guardex-dev
gx cockpit --session guardex-dev --attach
gx cockpit --target /path/to/repo
gx cockpit --backend auto
gx cockpit --backend kitty
gx cockpit --backend tmuxgx cockpit supports --backend auto|kitty|tmux. auto is the
default; it uses Kitty when Kitty remote control answers and otherwise
falls back to tmux. GUARDEX_COCKPIT_BACKEND overrides the default.
The backend choice does not change the safety model: branches,
worktrees, locks, PR-only finish, and cleanup rules stay the same.
Kitty mode normally assumes the cockpit is launched from inside a Kitty
window with allow_remote_control yes already set in kitty.conf. If
you want gx cockpit to spawn its own Kitty host instead — the
"dmux-style" experience where one command opens a fresh Kitty window
and tiles agent lanes inside it — pass --host:
gx cockpit --host
gx cockpit --host --socket /tmp/gx-cockpit.sock
gx cockpit --host --session guardex-dev--host (alias --bootstrap-kitty) does the following:
- Spawns
kitty -o allow_remote_control=yes -o listen_on=unix:<sock>detached, with the repo root as--directory. - Waits for the listen socket to appear, then prepends
--to=unix:<sock>to every subsequentkitty @ launch,@ focus-window,@ send-text, etc. - Falls back through the normal Kitty layout plan: control pane,
one pane per active
agent/*lane, optional details pane.
Pass --socket <path> to pin a stable socket path (useful if other
tools — or gx agents start in a follow-up shell — should target the
same Kitty host). Pass --no-host to force the legacy "must already be
inside Kitty" mode.
--host requires the kitty binary on PATH (or GUARDEX_KITTY_BIN
set). It does not require allow_remote_control to be enabled in
kitty.conf, because the spawned host is configured inline via -o.
When you run gx cockpit from an interactive terminal that is not
already a Kitty session (e.g. from gnome-terminal, alacritty, or any
shell where KITTY_LISTEN_ON is unset) and the kitty backend is
selected, gx cockpit auto-bootstraps a Kitty host as if you had
passed --host.
Auto-host is disabled when any of the following hold:
- The cockpit is invoked with
--no-host. KITTY_LISTEN_ONis already exported (you are inside a Kitty session — remote control is reachable through the parent socket).stdoutis not a TTY (CI, piped output, scripted tests).GUARDEX_AUTO_HOST=0(orfalse/no/off) is exported.
This makes the dmux-style "type one command, get a guarded multi-agent window" UX work out of the box while keeping the legacy "I am already inside Kitty with RC enabled" path untouched.
Start Codex:
gx agents start "fix auth tests" \
--agent codex \
--base main \
--claim test/auth.test.js \
--claim src/auth/session.jsStart Claude Code:
gx agents start "update setup docs" \
--agent claude \
--base main \
--claim README.md \
--claim docs/agents-cockpit.mdDry-run first when you want to see the branch, worktree, and launch command without creating anything:
gx agents start "fix auth tests" --agent codex --base main --dry-run
gx agents start "update setup docs" --agent claude --base main --dry-runCodex lanes use .omx/agent-worktrees. Claude lanes use
.omc/agent-worktrees. Both produce agent/<agent>/<task-slug>-<time>
branches.
Show agent service status:
gx agents statusList changed files for one lane:
gx agents files --branch agent/codex/fix-auth-tests-2026-04-29-21-30
gx agents files --branch agent/codex/fix-auth-tests-2026-04-29-21-30 --jsonShow one lane's diff against its recorded base branch:
gx agents diff --branch agent/codex/fix-auth-tests-2026-04-29-21-30
gx agents diff --branch agent/codex/fix-auth-tests-2026-04-29-21-30 --jsonShow files locked by one lane:
gx agents locks --branch agent/codex/fix-auth-tests-2026-04-29-21-30
gx agents locks --branch agent/codex/fix-auth-tests-2026-04-29-21-30 --jsonThese inspection commands are lane-scoped. They require --branch so a
human or cockpit pane must choose which sandbox to inspect.
Finish by branch:
gx agents finish --branch agent/codex/fix-auth-tests-2026-04-29-21-30 --base mainFinish by session id when a session record is available:
gx agents finish --session session-finish-1 --base maingx agents finish delegates to the existing Guardex finish flow for the
selected session branch. The normal finish path commits the sandbox,
pushes the branch, opens or updates a PR, waits for merge when requested
by finish flags, and prunes the worktree.
For a PR-only handoff without waiting for merge:
gx agents finish \
--branch agent/codex/fix-auth-tests-2026-04-29-21-30 \
--no-wait-for-merge \
--no-cleanupUse that only when the lane must remain open for review. The default team completion path should still end in merged PR evidence and worktree cleanup.
GitGuardex orchestration is built on the same safety model as the lower level branch workflow:
- Isolated worktrees: each task runs in its own filesystem sandbox under
.omx/agent-worktreesor.omc/agent-worktrees. - File locks:
--claim <path>claims files immediately after branch creation, andgx agents locks --branch <agent/...>shows ownership. - Protected base branches:
main,dev, andmasterstay protected by hooks; agents work onagent/*branches instead. - PR-only finish: completed agent work flows through PR creation, merge-state verification, and cleanup instead of direct base commits.
The cockpit does not weaken these rules. It gives a control pane and shorter commands for the same guarded lifecycle.
Codex implementation lane:
gx cockpit --session guardex
gx agents start "implement checkout retry" \
--agent codex \
--base main \
--claim src/checkout/retry.js \
--claim test/checkout-retry.test.js
gx agents files --branch agent/codex/implement-checkout-retry-2026-04-29-21-30
gx agents diff --branch agent/codex/implement-checkout-retry-2026-04-29-21-30
gx agents finish --branch agent/codex/implement-checkout-retry-2026-04-29-21-30 --base mainClaude documentation lane:
gx cockpit --session guardex-docs --attach
gx agents start "refresh onboarding docs" \
--agent claude \
--base main \
--claim README.md \
--claim docs/onboarding.md
gx agents files --branch agent/claude/refresh-onboarding-docs-2026-04-29-21-31
gx agents diff --branch agent/claude/refresh-onboarding-docs-2026-04-29-21-31
gx agents finish --branch agent/claude/refresh-onboarding-docs-2026-04-29-21-31 --base mainIf you have used dmux-style terminal orchestration, treat GitGuardex as a guarded orchestration layer, not a terminal multiplexer clone. The cockpit helps you see and drive multiple agents, but the product boundary remains repo safety: isolated sandboxes, file ownership, base branch protection, and PR-only completion.