Repository navigation
fix(agents): retain completed exec process owner - #169302
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThis PR preserves the agent owner of completed background commands while releasing their notification routing. Example: Agent main finishes a background command in global scope.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it repairs a current-main process visibility defect with a focused change, and no introduced correctness or security defect was found. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherExec runtime registers process records, terminal settlement releases execution context, and the Gateway supplies authorized process summaries to the Processes panel. flowchart LR
A[Agent exec request] --> B[Exec runtime]
B --> C[Process registry]
B --> D[Terminal settlement]
D --> C
C --> E[Scoped process observation]
E --> F[Gateway authorization and response]
F --> G[Processes panel]
Technical reviewBest possible solution: Retain the admission-time agent identity on the existing process record while continuing to release notification routing and apply normal retention. Do we have a high-confidence way to reproduce the issue? Yes: current-main settlement clears agentId on the retained record, and the global observation predicate then excludes it; no target code was executed during this read-only review. Is this the best way to solve the issue? Yes: removing the erroneous deletion repairs the producer while preserving the existing observation owner, notification ordering, and retention policy. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 7bf555adcaef. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource -1, Tests +11. Total +10 across 2 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 11, 2026, 3:16 PM ET / 19:16 UTC. |
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
What Problem This Solves
Fixes completed background commands disappearing from the Processes panel when a session uses global scope.
User Impact
Finished commands remain visible to their owning agent until normal process retention expires. Notification routing is still released at completion; no configuration or migration is required.
Why This Change Was Made
Terminal cleanup erased the process's frozen agent owner along with temporary notification routing. Global process observation requires that owner. Preserve it by deleting the erroneous cleanup line instead of introducing a second lookup or fallback.
Evidence
The strengthened runtime regression failed on the original code in all four terminal routing paths, then passed after the repair. It exercises actual execution settlement and verifies that the same process incarnation remains observable to its global owner and is hidden from another agent. Cleanup failure and notification ordering regressions remain green.
Focused execution cleanup and observation suites: 22 tests passed, 57.511 seconds wall time (47.98 seconds Vitest duration, dominated by compiled-worker preparation; test bodies completed in milliseconds). Production delta: -1 line. Fresh independent Codex review through P2: scoped-clean. Exact-head hosted production/test types, lint, guards, ratchets and security-fast passed. The duplicate local type sweep was stopped with exit130 after those hosted results completed; its partial results are not a full local pass.
Separate live reliability baseline at cbb31aa: real OpenAI file work, thread isolation and subagent synthesis passed 3/3, with two isolated scenario workers. This is campaign context, not candidate-head proof for the process repair.
CI run38166950786 attempt1 has five inherited ordinary exec-notification fixture failures and one fail-fast-cancelled sibling. An independent frozen-baseline replay reproduced exactly the same five failures (6 passes/5 failures, wall137.66s). Their causal owner sources are identical in CI base ad83ee1 and tested merge92d129b5bdb61745e1b4affeb790d625e49781c1. These fixtures were left behind by the session-event admission migration and provide no initialized destination. Notification runs before this PR’s changed cleanup line. Landing uses the repository’s attributed inherited-failure admin route; failed or cancelled coverage is not presented as passing. The retired passive notification fallback remains removed.