Skip to content

Decoupled live-preview provisioning ​

When a coordinator run reaches Build & Test, Agentweaver now tries to show you the assembled app running before you make the final human-review decision. This preview is a platform step after Build & Test, not something the Build & Test agent may or may not do.

For implementation details, see the deep dive. For event and endpoint details, see the reference.

When it runs ​

The preview step runs after Build & Test for:

  • Build & Test approved;
  • Build & Test requested changes.

It skips when Build & Test declines, because the gate is already terminal. It also self-skips when the deployment cannot produce a reachable Gateway preview, and records that as a skipped preview outcome. There is no feature flag; this is the default behavior.

What you see ​

StateMeaningWhat to do
Open previewThe assembled app is reachable at a Gateway preview URL.Open it and inspect the running result before approving or requesting changes.
Preview pending approvalThe existing preview approval gate is waiting for your decision and shows its expiry.Approve or deny the persistent tool-approval card.
Preview approval expiredThe project approval window elapsed, but the healthy preview process is retained.Choose Retry approval to create a fresh approval attempt without restarting the run.
Preview unavailableThe app could not be started, no listening port was discovered, the app exited early, observe failed, approval failed, or registration failed.Continue review; preview failure does not block you.
No preview statePreview was not applicable or was skipped by infrastructure.Review the diff normally.

The preview URL appears on the Build & Test row and in the human-review artifacts panel.

Step by step ​

  1. Start a coordinator run. Confirm the outcome spec when using Define Outcome; Direct start and unattended pickup do not require that manual confirmation.
  2. Let child subtasks finish and collective assembly run.
  3. Build & Test evaluates the assembled tree.
  4. If the verdict is approved or request-changes, Agentweaver starts the preview step.
  5. If approval is required, approve the preview request in the normal tool-approval card. If it expires, retry it from the card or preview status; each retry has a fresh request id.
  6. Open the preview URL if it is available.
  7. Complete human review: approve, request changes, or decline based on the diff and the running app.

What to expect ​

  • Actual port discovery. The platform starts the app and observes the port it really bound to; it does not assume port 3000 and does not inject PORT=3000 or --port. Discovery reads app log hints plus /proc/net/tcp and /proc/net/tcp6, so it does not require ss and catches IPv6-any (::) listeners.
  • Pod-IP reachability. AgentHost runs the app and TCP forwarder inside the sandbox pod, with the forwarder listening on 0.0.0.0 on an allowed public port, so the Gateway URL works even when the app only listened on 127.0.0.1.
  • Gateway is the real path. The API does not probe the sandbox pod directly. Publication checks the generated HTTPS Gateway URL; Open preview exercises the same hostname.
  • Verdict independence. A Build & Test request-changes verdict can still produce a preview so you can inspect what failed or what needs polish.
  • Preview failure is non-blocking. A failed preview is visible as Preview unavailable with legible reasons such as no_listening_port_discovered, process_exited:exit={code}, or observe_error, but it never forces a changes request and never prevents human review.
  • Approval visibility and recovery. Pending approval stays present in the notification badge, persistent toast, and accessible timeline card. The project-configurable window defaults to 1440 minutes (24 hours); expiry preserves the running process so approval can be retried if it is still healthy. Preview lifetime is separately configurable, also defaulting to 1440 minutes, and is used for both initial expiry and the hard cap.
  • Retention is deliberate. Build/Test and active-preview resources can remain alive during review. A finished run does not by itself guarantee a usable preview: its pod, process, and route must still exist and remain within the configured lifetime.
  • Credential isolation. The preview-runner credential is per-run, delivered in memory, scrubbed from child process environment, and deleted on terminal cleanup or orphan reaping.
Diagram details and constraints
ElementContract
titlePreview ready means validated publication
takeawayPlatform-owned orchestration still has explicit skip, denial, expiry and failure outcomes.
Build/Test verdictBuild/Test verdict
Build/Test verdictApproved or request-changes
Build/Test verdictDeclined: no preview stage
Command resolutionCommand resolution
Command resolutionHeuristic then bounded model
Command resolutionUnavailable infra: skipped
AgentHost runnerAgentHost runner
AgentHost runnerMap effective workspace
AgentHost runnerStart authenticated process
App + forwarder healthApp + forwarder health
App + forwarder healthObserve actual app port
App + forwarder healthBind reachable public port
Preview approvalPreview approval
Preview approvalGrant / deny / expire
Preview approvalPolicy auto-approval is explicit
Approved publicationApproved publication
Approved publicationActive run + process recheck
Approved publicationCreate Service and HTTPRoute
No publicationNo publication
No publicationDeny: stop; expire: private retry
No publicationNever emit ready on rejection
Generated HTTPS URLGenerated HTTPS URL
Generated HTTPS URLBounded DNS/readiness checks
Generated HTTPS URLFailure: rollback publication
preview_readypreview_ready
preview_readyExact URL validated
preview_readyReturn to authored gate handling
arrow-1prepare
arrow-2start
arrow-3observe
arrow-4request
arrow-5grant
arrow-6reject
arrow-7probe
arrow-8healthy
note-0Denial/expiry branch stays private; unresolved commands fail explicitly.
note-1Rows summarize stages; the page retains detailed failure and retry rules.
note-2Resource creation alone is not readiness; API does not probe pod preview ports.
notesDenial/expiry branch stays private; unresolved commands fail explicitly.; Rows summarize stages; the page retains detailed failure and retry rules.; Resource creation alone is not readiness; API does not probe pod preview ports.