GeezerVison is showing github.com — fleet: add a commander subcommand wrapping the Desktop Commander endpoint for laptop execution · Issue #13654 · developing-today/code
fleet: add a commander subcommand wrapping the Desktop Commander endpoint for laptop execution #13654DescriptionProposal
Add a commander subcommand (domain) to the fleet binary that wraps the self-hosted Desktop Commander endpoint (#13404) for laptop command execution, so lanes and scripts get one clean CLI instead of hand-rolled curl.
Why
As of 2026-11-23 the standing route order for lane laptop work is:
- Desktop Commander (
https://commander.security.cab/mcp) — empirically the only route whose tool results do not trip the platform execution-risk check that fires on git content returned via the laptop-agent/SSH path.
- laptop-agent (
~/tools/laptop-agent.py; also what laptop-ssh.sh delegates to since 2026-11-04).
- Real SSH (
laptop-ssh-real.sh) — laptop-agent's automatic fallback; last resort.
Route 1 is currently driven by a hand-rolled recipe (verified working 2026-11-23, Lane DC1): fetch the machine bearer at call time via fleet secrets get desktop-commander.machine-bearer (by name; the value is never written to a file or log), POST MCP JSON-RPC over HTTPS with a browser User-Agent (the Cloudflare edge 1010-blocks the default Python UA), initialize → keep the Mcp-Session-Id → tools/call, parse the text/event-stream data: lines. Friction a subcommand should hide:
start_process requires a timeout_ms argument (zod validation rejects the call without it).
- Every
start_process spawns a fresh process on the laptop; callers must poll read_process_output for long commands and terminate sessions (list_sessions / force_terminate) — un-reaped sessions are the pile-up failure mode seen 2026-11-23.
- SSE parsing and session-id handling are re-implemented by every caller.
Shape
fleet commander exec [--cwd D] [--timeout S] -- cmd... — mirrors the laptop-agent client verbs so call sites can swap routes mechanically; runs the command on the laptop via the Commander endpoint and streams/returns its output with the exit code propagated.
fleet commander health — initialize + one trivial tool call, reports latency.
- Auth: the subcommand fetches
desktop-commander.machine-bearer from the secrets broker itself (broker-first, by name); no token in argv, files, or logs.
- Session discipline built in: one MCP session per invocation, every spawned process terminated or explicitly detached with its session id printed (the
run/poll pattern from laptop-agent).
Acceptance
fleet commander exec -- hostname prints amd with exit 0 from the sandbox.
- A read-only git command in a laptop checkout returns its real output; a failing command propagates its exit code.
- Long-running commands can be polled to completion without leaving orphaned Desktop Commander sessions behind (verified via
list_sessions before/after).
- No secret value appears in the binary's output, logs, or any file it writes.
Context: the fleet binary's laptop-agent domain is currently a registry stub (exit 69, epic #5412); this domain is a sibling, not a replacement — laptop-agent remains route 2.
{
"direct_parent": null,
"links": [],
"lineage": {
"design": null,
"roadmap_item": null,
"priority": null
},
"pm_meta": 1,
"provenance": {
"queue_id": null,
"scheduled_start": null,
"picked_up_at": null,
"work_started_at": null,
"created_at": "2026-11-23T19:39:14Z",
"session_id": null,
"lane": null,
"host": "htch-runtime",
"worktree": null,
"model": null,
"lane_start_issues": [],
"workspace_ref": null,
"auth_subject": "archer",
"stamped_by": "fleet 0.1.0 (native)"
}
}
Activitydeveloping-today commented on Nov 23, 2026 dezren39 commented on Nov 23, 2026 Scope update (2026-11-23, Drew's route-codification direction): this subcommand is now form F1 of the codified laptop route-form family filed as #13717 — 3 methods (commander / http-direct / ssh) × 2 shapes (fleet subcommand / raw command) + the laptop-ssh wrapper as the fallback / simplified tier (F7). The commander build proceeds exactly as specified here; the family issue carries the shared design (endpoint-grade contracts per method, timeout-by-construction, form visibility in every result, the fleet laptop walker composition, and the laptop-ssh demotion).
One premise correction from intake: this issue's note that the fleet binary's laptop-agent domain is a registry stub (exit 69) is stale — the domain landed under #10796 and fleet laptop-agent health answers live from the sandbox today. That matters for the family's F3 (fleet http), which builds an explicitly HTTP-only ladder from that client's leg types. Full intake record is on #13717. dezren39 commented on Nov 23, 2026 T1 landed. The commander subcommand this issue asked for shipped as tier T1 of the route-form matrix (#13717) in PR #13773 (merged, c1a99d5e): fleet commander health|exec — bearer resolved by name from the secrets broker at call time, browser UA, one MCP session per invocation, timeout_ms always sent, processes polled to completion or force-terminated (no orphans), remote exit code read from the endpoint's completion line and propagated.
Sandbox smoke (built binary): health → {"ok":true,"form":"T1 commander/fleet","host":"amd"}; exec -- hostname → amd; exec -- 'exit 3' → exit 3. Raw-shape sibling (T4, the documented curl recipe) verified as written too. Seat-wide availability rides the next fleet-static publish. dezren39 commented on Nov 24, 2026
Triage verdict (lane any-o, queue task 22370, 2026-11-24): resolved in substance — closing.
Fresh verification on current checkout:
No follow-on packet: work is done, not merely sized. dezren39 commented on Nov 24, 2026
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|