Skip to content
Merged
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ the PR as a readable severity, location, and finding table.
| `gx branch finish --via-pr --wait-for-merge --cleanup` | Ship safely through a PR. |
| `gx branch finish --fast` | Squash-merge a locally verified small change without local preflight or AI review. |
| `gx agents status` | Show active agent lanes. |
| `gx agents send --session <id> --message <text>` | Deliver safely to an idle agent or queue for its next turn. |
| `gx agents inbox [--ack <message-id>]` | Read or acknowledge the authenticated standalone message queue. |
| `gx cleanup` | Prune merged or stale worktrees. |

Need the terminal cockpit? Run `gx cockpit`; see the
Expand Down
42 changes: 42 additions & 0 deletions docs/agents-cockpit.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,48 @@ gx agents locks --branch agent/codex/fix-auth-tests-2026-04-29-21-30 --json
These inspection commands are lane-scoped. They require `--branch` so a
human or cockpit pane must choose which sandbox to inspect.

## Message an idle agent lane

Send a message by canonical session id:

```bash
gx agents send \
--session agent__codex__fix-auth-tests \
--message "Re-run the focused auth test and report the result."
```

Or select the target by its recorded branch:

```bash
gx agents send \
--branch agent/codex/fix-auth-tests-2026-04-29-21-30 \
--message "Re-run the focused auth test and report the result."
```

Have the registered source agent run the command from its worktree. It may pass
`--from-session <id>`; GitGuardex verifies that the caller descends from that
session's live agent process. GitGuardex first attempts guarded live delivery
to an active session whose activity is `done`, whose backend is tmux, and whose
recorded pane still has the expected agent process in the foreground. The
message is wrapped in a nonce-stamped outer envelope and pasted through a named
tmux buffer. If the target is busy or its live pane cannot be safely verified,
GitGuardex stores the authenticated message in a private, worktree-shared queue
instead of dropping it.

The target agent reads and acknowledges pending messages from its own
registered process:

```bash
gx agents inbox
gx agents inbox --ack <message-id>
```

The repo-scoped `gx` MCP exposes the same flow as `send_agent_message`,
`read_agent_messages`, and `ack_agent_message`. This works without a Nodeterm
server; caller-process and session ownership are still verified. Live-send
success confirms paste and submission, not that the target agent read or acted
on the message. Queued messages remain pending until acknowledged.

## Finish a lane

Finish by branch:
Expand Down
Loading