trunk → main: fix(broker): verify PTY turn submission (#1891)
Merge-train PR (manual interim merge-agent run, per AGENTS.md "Merging: trunk + the mergeable label").
Contents:
- #1891 fix(broker): verify PTY turn submission. Fixes messages to idle or parked Codex agents being typed into the composer but never submitted.
#1891's CI was green on its previous base. This PR runs the full suite against current main.
🤖 Generated with Claude Code
[!NOTE]
High Risk
Changes core PTY message delivery, fleet ack gating, and failure/recovery semantics—incorrect acceptance detection could drop, duplicate, or block agent turns across production brokers.
Overview
PTY broker delivery no longer treats terminal echo (or a timeout) as success. Messages stay pending until the harness proves a turn started—activity markers, a cleared idle composer, or (for cat) process echo—and failed or parked delivery blocks further sends instead of silently queueing more input. When the body is still visible in the live composer, the worker may run up to three submit-only recovery attempts (End/CR/LF style keys via submit_injection_recovery, without replaying the body); human write_pty input cancels automatic verification and fails the in-flight delivery. Broker/runtime wiring adds delivery_unconfirmed / delivery_resubmitted observability, harness_acceptance + evidence on delivery_verified, and keeps agents BlockedOnSend until acceptance clears. Supporting changes include richer composer/snapshot detection (Codex, Claude, Gemini, Devin), expanded activity detectors, and extensive tests (plus ignored live-Codex probes).
CI can target optional StarSling Linux runners via vars.CI_LINUX_RUNNER, with explicit stable Rust on those images and a dedicated sandbox-proof job on GitHub ubuntu-latest so Landlock PR-proof tests cannot be skipped on incompatible runners. CHANGELOG and Devin harness docs document the new acceptance/recovery behavior; AGENTS.md merge-train snippet formatting only.
Reviewed by Cursor Bugbot for commit da7d54de3fee64ff699885518e38fcb59bf668a0. Bugbot is set up for automated code reviews on this repo. Configure here.
Agent Relay sessions