skip to content
Replays

External Agent Window

Detached Blocker Investigations

Blocker-launched agents can open outside the live TUI while inline suspend remains available.

Gantry milestones

1 milestones 4 tasks 9 agents

2 plan 4 execute 5 review

188k peak context

121k median execute

Blocker-launched agents can open outside the live TUI while inline suspend remains available.

59m 26s total 5m 48s per task

30m 5s execute 13m 30s review

45 edits 323 commands

codex harness

This run changed what happens when a blocked Gantry run asks the operator to launch an outside investigation agent. Before it, that helper took over the same terminal as the TUI; after it, Gantry can resolve a supported terminal launch, request a detached window, and keep the monitor alive.

The plan was narrow but cross-cutting. It started with a pure resolver and schema-backed settings, then wired that contract into the TUI launch path, added prompt state around detached launches, and finished by documenting the supported contracts and the emulator-detection paths Gantry does not use.

How this walkthrough is structured

Feature

What did the run build and ship?

The current tree still carries the external terminal resolver, configuration schema, diagnostic command, detached TUI launch path, and documentation, while one confirmation promise has since drifted in code.

Build

How did Gantry structure the work?

The build put the launch policy behind a pure resolver first, then let each later sprint consume one stable contract without a repair or replan.

Milestone 1

Launch Agent Window

4 tasks 11 agents 52m 44s wall time 188k peak context

The surviving code spans config loading, command registration, pure terminal resolution, TUI launch behavior, prompt state, tests, and docs. Gantry can still decide between inline and window behavior from user settings and environment snapshots, and the hidden diagnostic can print the current decision without raising a blocker. The feature is therefore still present as a product surface, not only as historical documentation.

This milestone owned the complete external-agent window feature as one bounded project. Its brief named the end-to-end contract but also excluded broad emulator detection and left the run-worktree shell on the existing inline path. The internal sprints split policy, launch wiring, prompt state, and documentation, so each fresh agent worked against an explicit handoff instead of the whole terminal problem. The run record shows clean execution through the nested work, with repeated post-review gates rather than recovery.

Resolution Contract

2 agents 12m wall time 121k peak context

`src/external_terminal.rs` still owns the pure resolver. It parses auto, window, and inline modes, prefers configured argv before multiplexer and GUI launch tiers, gates GUI tiers on a display server, wraps prepared commands through a POSIX shell, and tests the behavior with synthetic environment and path snapshots. The config schema and runtime config still expose the external-agent mode and terminal-command argv settings with environment overrides.

This sprint carried the policy layer and deliberately did not spawn anything. The brief asked for schema-backed settings, environment precedence, explicit modes, a declared launch order, shell wrapping, and hermetic resolver tests. That made the first agent's output a pure contract later sprints could call without sharing TUI state or live terminal assumptions. Its boundary held cleanly through review and a post-review gate.

Detached Window Launch

2 agents 19m 54s wall time 188k peak context

The TUI still prepares the existing external harness command, resolves it through the terminal contract, and either launches detached, suspends inline, or reports refusal according to mode. Detached launches use a separate process session and null standard descriptors, and quick failed terminal commands are treated as launch failures. `gantry external-agent` remains registered as a diagnostic that prints the selected tier and command without opening a terminal.

This sprint was the integration point between the resolver and the live TUI. Its brief kept run-worktree shells out of the new resolver path, so the agent only had to route external harness launchers through the contract and preserve inline suspend as fallback. The extra gate after review is evidence that the new launch path was checked once the diagnostic and TUI surfaces were wired together. No replan or repair is recorded for this boundary.

Honest Blocker Check

2 agents 5m 48s wall time 98k peak context

The current state still has a prompt-scoped marker for a detached external investigation launch, and tests still prove that stale markers do not leak to later blockers. The confirmation behavior described in this sprint's original brief is no longer what the current tests assert: Proceed and Stop now answer directly even when the marker is present. The durable contribution that can be isolated today is the marker and its prompt scoping, while the local confirmation requirement has been superseded or removed.

This sprint consumed the launched-marker handoff from the TUI wiring sprint. The brief asked for prompt-local state that would treat a detached launch as a truthful fact about a request Gantry made, not as a process-lifetime claim. That was a narrow enough state-machine task for a fresh agent: scope the marker to the blocker and decide which actions should see it. The run facts show the sprint passed cleanly through review.

Docs and Status

2 agents 4m 2s wall time 79k peak context

`docs/agents/config.md` still documents the external-agent settings, environment overrides, argv treatment, resolver order, display-server rule, inline fallback, and diagnostic command. The blocker prompt analysis still marks the same external-window problem as resolved and records the refusal to infer emulator identity from terminal variables, ancestry, or compatibility tables. Those docs now diverge from current TUI tests on the confirmation detail, but they still describe the resolver and detached launch model that remain in code.

This sprint was intentionally editorial and came after implementation. Its brief required the docs to describe the behavior that had actually shipped, including mode semantics, argv configuration, launch order, display gating, fallback, and the excluded heuristics. Because the code contracts were already present, the agent could audit documentation against implementation rather than design the feature again. The sprint stayed green through the same post-review gate shape as the earlier units.