Repository navigation
fix(sessions): preserve transcript turn and child-session ownership - #116897
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 31, 2026, 12:00 PM ET / 16:00 UTC. ClawSweeper reviewWhat this changesThis PR resets child-agent completion summaries at new transcript turns, makes equal-time child findings deterministic, and reconciles Gateway child-session discovery with the Control UI sidebar’s navigation-parent lineage. Merge readiness⛔ Blocked until real behavior proof from a real setup is added - 7 items remain Keep this PR open for human review. The supplied context shows a focused repair with extensive test claims, but the review environment could not perform even read-only repository inspection ( Priority: P1 Review scores
Verification
How this fits togetherThe agent runtime reads a child session’s transcript to report completion back to its parent. Separately, the Gateway exposes child-session relationships to the Control UI, which renders them under dashboard conversations; the patch changes how those two paths distinguish a runtime controller from a navigation parent. flowchart LR
A[Child-agent transcript] --> B[Completion summary]
B --> C[Parent-agent findings]
D[Session store] --> E[Gateway session filter]
F[Active child controller] --> E
E --> G[Sidebar parent resolver]
G --> H[Dashboard session tree]
Decision needed
Why: That rule affects session discovery and authorization-adjacent visibility semantics across Gateway and Control UI paths; the protected maintainer label and blocked source inspection prevent safely resolving the intended permanent contract automatically. Before merge
Findings
Agent review detailsSecurityNeeds attention: The patch changes authorization-adjacent Gateway child-session visibility, but blocked repository reads prevented verification of the existing access contract and all affected callers. PR surfaceSource +140, Tests +324. Total +464 across 13 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Rebase or refresh the PR against current Do we have a high-confidence way to reproduce the issue? No: the supplied PR body describes focused tests, but the review environment could not inspect or run the current checkout, and it includes no independently viewable current-head runtime artifact. Is this the best way to solve the issue? Unclear: the proposed shared dual-owner predicate may be the right bounded repair, but source-level comparison with the existing visibility contract, callers, and sibling projections is required before calling it the best solution. AGENTS.md: unclear because the file could not be read completely. Codex review notes: model internal, reasoning high; reviewed against f66fff57f339. LabelsLabel justifications:
EvidenceSecurity concerns:
What I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (2 earlier review cycles)
|
33ad986 to
057baa1
Compare
057baa1 to
5ffadff
Compare
|
Merged via squash.
|
* origin/main: (42 commits) fix(auto-reply): avoid false overload attribution on stalled replies (#116959) fix(auth-profiles): scope model_not_found cooldown to the failing model (#116768) fix(agents): expose embedded preparation latency (#116936) fix(macos): preserve localized setup fallback fix: repair canonical session keys with doctor (#116703) fix(gateway): preserve plugin-only session change events (#116948) fix(media): recognize AIFF attachments across audio workflows (#116907) fix(openai): recover missing terminal response output (#116910) fix(telegram): preserve outbound media metadata and rejected photos (#116886) fix(agents): preserve bounded truthful subagent outcomes (#116932) improve(setup): clarify local provider actions fix(cron): preserve scheduler truth across edits and delivery (#116923) fix(openai): finalize Chat tool calls from authoritative terminals (#116922) fix(ui): recover session observers across reconnects (#116887) fix(qa): verify requested scenarios and reject silent character runs (#116912) fix: agent turns survive unavailable optional web credentials (#112522) fix(sessions): preserve transcript and child ownership (#116897) fix(ui): preserve chat stream ownership and accessible rendering (#116929) fix(media): preserve display metadata and attachment formats (#116928) fix(together): preserve immediate video outcomes and image references (#116913) ...
Co-authored-by: Peter Steinberger <[email protected]>
* origin/main: (42 commits) fix(auto-reply): avoid false overload attribution on stalled replies (openclaw#116959) fix(auth-profiles): scope model_not_found cooldown to the failing model (openclaw#116768) fix(agents): expose embedded preparation latency (openclaw#116936) fix(macos): preserve localized setup fallback fix: repair canonical session keys with doctor (openclaw#116703) fix(gateway): preserve plugin-only session change events (openclaw#116948) fix(media): recognize AIFF attachments across audio workflows (openclaw#116907) fix(openai): recover missing terminal response output (openclaw#116910) fix(telegram): preserve outbound media metadata and rejected photos (openclaw#116886) fix(agents): preserve bounded truthful subagent outcomes (openclaw#116932) improve(setup): clarify local provider actions fix(cron): preserve scheduler truth across edits and delivery (openclaw#116923) fix(openai): finalize Chat tool calls from authoritative terminals (openclaw#116922) fix(ui): recover session observers across reconnects (openclaw#116887) fix(qa): verify requested scenarios and reject silent character runs (openclaw#116912) fix: agent turns survive unavailable optional web credentials (openclaw#112522) fix(sessions): preserve transcript and child ownership (openclaw#116897) fix(ui): preserve chat stream ownership and accessible rendering (openclaw#116929) fix(media): preserve display metadata and attachment formats (openclaw#116928) fix(together): preserve immediate video outcomes and image references (openclaw#116913) ...
What Problem This Solves
Fixes an issue where users coordinating repeated child-agent tasks could receive a previous task's answer when the new turn produced no reply, where simultaneously completed child tasks could change order between equivalent parent summaries, and where a controlled dashboard child was undiscoverable, misplaced, or duplicated because live Gateway filtering and sidebar lineage disagreed about its navigation owner.
Why This Change Was Made
Child completion now recognizes canonical user and projected inter-session turn boundaries, and equal-timestamp results use stable child-session identity. Gateway live-owner filtering plus full-list and single-row child indexes now preserve both the explicit navigation parent and the actual runtime controller while still rejecting stale
spawnedBymetadata. One canonical sidebar parent resolver consistently prefers a trimmed, non-empty explicit navigation parent and falls back to the controller for blank or whitespace legacy metadata. This follows the existing session-visibility contract, which already authorizesparentSessionKey; no session-history cursor, persistent state, SQLite schema, authentication, authorization boundary, or public protocol contracts change.User Impact
Parent agents no longer mistake an old answer for a newly failed or silent task, concurrent child findings remain stable, and unloaded controlled child sessions can be discovered and displayed exactly once beneath their actual dashboard conversation.
Evidence
e051a7bb4a6ba69b87391e990b00813114b1d482; exact candidate:33ad986ebe503ccd3f9dc906cf02ff486e534302.PATH="/Users/steipete/.local/opt/node-v24.18.0-darwin-arm64/bin:$PATH" /Users/steipete/.local/opt/node-v24.18.0-darwin-arm64/bin/node scripts/run-vitest.mjs src/agents/subagent-announce-output.test.ts— 27 passed.ui/,/Users/steipete/.local/opt/node-v24.18.0-darwin-arm64/bin/node ../node_modules/vitest/vitest.mjs run --config vitest.config.ts --project unit src/components/app-sidebar-session-navigation-logic.test.ts src/lib/sessions/session-key.test.ts --maxWorkers=1— 16 passed, including whitespace/empty parent fallback and direct child ancestry./Users/steipete/.local/opt/node-v24.18.0-darwin-arm64/bin/node node_modules/vitest/vitest.mjs run --config test/vitest/vitest.gateway-core.config.ts src/gateway/session-utils.subagent.test.ts --maxWorkers=1 --testNamePattern 'discovers controlled children|keeps persisted navigation lineage|does not reattach moved children|does not return moved child sessions|returns dashboard child sessions'— 5 passed; exercises the real Gateway filtered list, current controller, explicit navigation owner, stale-controller rejection, and both full/single-row child indexes.ui/,/Users/steipete/.local/opt/node-v24.18.0-darwin-arm64/bin/node ../node_modules/vitest/vitest.mjs run --config vitest.config.ts --project unit src/components/app-sidebar.test.ts --maxWorkers=1 --testNamePattern 'renders a controlled child once under its explicit dashboard parent|keeps owner avatars off child rows'— 2 passed, including a genuinely unloaded child, owner-aware Gateway filter, and a real mounted sidebar.oxfmt --check,oxlinton all twelve changed files, andgit diff --checkpassed.src/plugin-sdk/session-visibility.ts:359already treats explicitparentSessionKeyas an authorized owner.../codex/codex-rs/app-server-protocol/src/protocol/thread_history.rs:474,../codex/codex-rs/app-server-protocol/src/protocol/thread_history.rs:1208, and../codex/codex-rs/app-server-protocol/src/protocol/thread_history_projection.rs:53.gpt-5.6-solautoreview: clean, confidence 0.96, no accepted/actionable findings; shared TruffleHog secret scan: clean.