Skip to content

tower: render-gate composer misclassification wedges delivery for minutes on a live session (busy holds never escalate) #1590

Closed

Description

@amrmelsayed

Split out of #1583 (item 2), the same way #1584 split out item 1. Reported from a sibling workspace's architect-builder pair, 2026-09-02, on codev 3.3.2.

Defect

The render gate's composer classification can wedge for minutes on a live, healthy recipient session: held-mail notices reported the recipient's "composer never classifies as a ready prompt" for 3 to 7 minutes, cron nudges did not deliver, and two operator ESC+Enter interrupts did NOT clear the condition (a watcher notice fired after both). Held row ids from the incident: cb24419d, 8c10f62e, c060d2bf (full ids and the timeline are on #1583).

While the gate misclassifies, all mail for that agent holds. On 3.3.2 this condition also fed the #1584 replay loop (echo-verify kept failing against the same screen state); with #1584's cap merged the loop is gone, but the underlying condition remains: delivery stalls for minutes on a session that is actually fine, and does so silently.

Why it is silent

The liveness/streak escalation in packages/codev/src/agent-farm/servers/mailbox-delivery.ts (recordStreak) deliberately excludes busy-reason holds from telemetry ("a human legitimately at the line - must not false-alarm"). A misclassifying gate that reports busy therefore never crosses into the escalation path, no matter how long it wedges.

What is known vs unknown

Known: the incident window, the held ids, the failed-interrupt timeline, and that the recipient agent was alive and responding throughout (its transcript shows it processing during the window). Unknown: WHY the classifier could not bound a ready composer - drifted TUI frame, scroll state, the recipient's harness repainting continuously, or a classifier profile gap. No reproduction exists yet.

Requirements (investigation-first)

  1. Reproduce or post-mortem the misclassification using the incident receipts (the reporting workspace holds transcripts; request via the architect channel) plus Tower logs for the window 2026-09-02T09:45Z-10:00Z.
  2. Root-cause why the composer never classified as ready while the session was live and interactive.
  3. Fix the classifier gap, or if the state is legitimately unclassifiable, make the gate degrade visibly instead of holding silently.
  4. Escalation correctness regardless of root cause: a busy hold streak on a row is not "a human at the line" when the hold is minutes long and interrupts have been observed on the same session; give sustained busy wedges a bounded path to operator visibility (the tower: HOTFIX — echo-verify re-write loop re-injects a delivered message unboundedly (3.3.2 regression from #1573; zero re-writes after a completed write) #1584 review's unverified-but-probably-delivered escalation is prior art for the shape).
  5. Regression tests for the classifier state found in 1, and for the escalation bound in 4.

Relations

#1583 (parent report, item 2), #1584 (item 1, merged - removed this condition's worst consequence), #1573 (introduced echo-verify, which this condition causes to fail), Spec 1313 (render gate), #1365 (write-edge lock).

Activity

  1. added
    bug
    area/tower
    on Sep 2, 2026
  2. amrmelsayed commented on Sep 9, 2026

    @amrmelsayed
    CollaboratorAuthor

    Verified fixed by the #1666 + #1604 pair — closing with code mapping and field data

    Verification run 2026-09-10, per the owner's word. The incident had two components; both are covered.

    1. The wedge itself (minutes-long holds on a live session). The incident's recipient was "alive and responding throughout" — i.e. producing output — and the pre-#1666 gate held on any screen output (settled() demanded no output byte anywhere; ringToken folded whole-screen bytes). #1666 rewrote both to the composer region, so a working agent's own output no longer holds its mail. The failed ESC+Enter interrupts fit the same story: they ended turns but the agent kept responding, so the whole-screen gate kept holding — under the composer-scoped gate that condition delivers.

    2. The silence (this issue's sharpest point). recordStreak excluded all busy holds from escalation, so a misclassifying gate could wedge forever without telemetry. Current code closes exactly that gap: isClassifierStuck → isUnverifiableVerdict escalates sustained no-profile / no-region-end / no-composer-marker streaks — the "will NEVER deliver on its own" class — to liveness telemetry, and #1604's detail sub-codes name the reason on every surface (afx inbox, dashboard, VS Code toast). Only genuine busy/user-text (a human at the line) remains excluded, which is the correct exclusion. A recurrence of this incident is now impossible to have silently: it either delivers (output-driven case) or names itself and escalates (true misclassification).

    3. Field data (global.db, read-only, deliveries since 09-05):

    Era Delivered >2s waits Mean wait Max wait
    Pre-fix (through 09-09 23:00Z restart) 1,064 239 (22%) 77s 1,920s (32 min)
    Post-fix (since restart) 14 0 — 0.4s

    The pre-fix era reproduces this issue's signature at worse-than-reported severity (32-minute max vs the reported 3–7 minutes). The post-fix sample is young (~40 min of traffic) but zero-of-fourteen against a 22% base rate is already ~3%-likely by chance; a 24h soak query will be appended tomorrow as confirmation. Same night, the #1644 confirmation pass delivered 5/5 long bodies intact across five architect terminals.

    Reopen trigger: any post-restart delivery showing a multi-minute hold whose detail names a composer-classification reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/towerbug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions