Launch the AI Review agent on native tasks, and report it when the launch fails - #1229
Merged
Conversation
h0x91b
force-pushed
the
fix/dev3-pr-ai-review-launch
branch
3 times, most recently
from
August 3, 2026 09:39
d90ec30 to
406c3da
Compare
Ordinary renderer polling could erase the very evidence the strict column-agent launch depends on: tolerant recovery swept a pane whose record it could not read out of the coordinator record, so a later strict read found a clean set and could open a second review agent beside a process nobody can account for. A pane whose record is present but untrustworthy is now marked ownership-unknown and kept in the record on both paths, while a pane that left no record at all is still swept as the dead pane it is. The coordinator record gets the same treatment via a strict read that separates ENOENT from corrupt. Failure copy selection is now exhaustive over the reason codes, so a new recognised reason cannot compile without its localized copy.
Structural validity was being read as ownership. A coordinator record copied from another coordinator, or one binding a pane to a session that coordinator never derives, passed every field check while describing processes we cannot account for; the same went for a per-pane record found under one session while claiming another. All three now mark the set undecidable rather than owned, on the tolerant path as well. Recovery also handed back the pre-sweep tree whenever any pane was ownership-unknown, so a proved-dead pane could be cached and republished under the same epoch by a later focus. It now returns the reconciled tree it just persisted, in every case. The per-pane check deliberately compares sessionId only: the host writes its own internal pane label into record.paneId, never the coordinator's logical pane id, and comparing those marks every real pane unknown. Both in-memory pane doubles were faking that field and are now honest about it, which the real-process multipane e2e proves.
create() read the coordinator record tolerantly, so a structurally valid but misbound record came back as null and was interpreted as absence: it skipped the live-set check, started a derived pane and atomically overwrote the file, leaving whatever live processes that record described orphaned with nothing pointing at them. It now reads strictly, so only a genuinely absent record may be created over. The sharp edge is deliberate and recorded in decision 197: an unbelievable coordinator record now blocks starting a terminal for that task instead of being silently overwritten.
h0x91b
force-pushed
the
fix/dev3-pr-ai-review-launch
branch
from
August 3, 2026 10:06
5fe8810 to
721c76c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hey — Claude here, the AI assistant that wrote this branch.
Moving a task to AI Review did nothing on any task using the native terminal backend, which is every task created since the native rollout default flipped. Two independent defects, both in that one path:
launchColumnAgentstill opened the review agent with a rawtmux split-windowintodev3-task-<id>. A native task has no such session, so the split died on the socket (can't find pane: dev3-…/Socket operation on non-socket).machine.tshandled the resultingcolumnAgentFailedforreview-by-aiby returning only the fallback move to Your Review — no push, no toast. The card hopped back on its own and said nothing, which is exactly the "AI Review does nothing" symptom.What changed
openAuxPane) under a newAuxPanePurposevaluecolumnAgent, whose marker is the existingcol-agent.shtemp path. Thecol-agent-paneid file is gone: ownership is re-derived from the launch command, so a repeated activation replaces the running review agent instead of stacking a second one, and it keeps working after an app restart. The native path touches no tmux; the tmux path keeps its 40% right split and still hands focus back to pane 0.columnAgentFailedgainedmovedTo?: TaskStatusso the copy can say where the task went, andreason?: ColumnAgentFailureReasonso a failure the app recognises is explained in localized copy.terminal-not-runningis the first such reason; the renderer picks one of four keys (en/ru/es) fromreason×movedToand never reads the Englisherrorstring — that stays diagnostic interpolation for failures we can only quote.Rationale and rejected alternatives:
decisions/197-column-agent-pane-ownership-and-failure-reason.md.