Repository navigation
fix(t3): guard private notes and child question tools (CLO-1087) - #245
nullStack65 wants to merge 10 commits into
Conversation
Finish the version-skew and child-question gaps left after #171. A-P1-01: /note is disabled in the web and mobile composers, with a reason, when the connected server does not advertise capabilities.humanNote, so a newer client never sends a private note to an older server that would treat it as a normal prompt. Wire-skew decoder regression tests cover missing and false capability advertisements. A-P1-06: child subagent threads can no longer discover or call t3_environment_link, t3_feedback or t3_thread_update(route), and a provider-native child user_input question is refused and routed to the parent instead of leaving a founder-facing question card or a deadlocked t3_pending_request wake. Model: claude/claude-sonnet-5-5 Task: bugfix Agent: Claude Code Lane: claude Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
- t3_thread_update route: an assignee naming a human now counts as a founder-inbox route and is denied to child threads, not only an audience. - DelegatedTaskQuestionReactor: always wake the parent after refusing a child's live human-input card. A blocking delegate_task wait can no longer see a refused card, so skipping the wake lost the question. - Update the hasPendingQuestion description and the reactor wake test for the new behavior. Model: claude/claude-sonnet-5-5 Task: bugfix Agent: Claude Code Lane: claude Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Defer to upstream #236 (CLO-1105) for the web /note capability gate; keep the server, mobile, client-runtime and contracts parts of CLO-1087. Model: claude/claude-sonnet-5-5 Task: bugfix Agent: Claude Code Lane: claude Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
{"reviewed_base": "a7ed817dfd2eeb0c625f99fbefe90b77298b71e2", "reviewed_head": "96c8934b85b0d5b5d029858369a0385e79697355", "reviewer": "grok/grok-4.7, t3/claude-code", "author_session": "mcp:5740c779-956b-4ac3-8faf-c0f70f6a2bad", "reviewer_session": "thread:delegated-task:command:mcp:68595c55-9484-49ad-89ce-82c0da02cb15:delegate-task:733281e4-5dc5-473b-b41d-f8acfaa1cee1", "fresh_context": true, "review_kind": "full", "round_id": "thread:delegated-task:command:mcp:68595c55-9484-49ad-89ce-82c0da02cb15:delegate-task:733281e4-5dc5-473b-b41d-f8acfaa1cee1", "intent": ["A delegated child's private notes stay private and its question tools are guarded, so a child cannot ask a question that blocks it without a path back to the parent."], "prior_findings": [], "findings": [{"id": "F1", "severity": "important", "summary": "Refusing a delegated child's live question does not resume OpenCode 1.x, so the child stays blocked on the native question. DelegatedTaskQuestionReactor.ts:77 attaches answers only for the codex driver, or muse with at least one question; every other driver, including OpenCode, gets decision cancel and no answers. The OpenCode 1.x responder (packages/provider-opencode/src/server/adapter.ts:4255) returns a protocol error requiring answers before any SDK call, never calls question.reject, and does not remove the pending request, which is cleared only on question.replied or question.rejected. The respond effect retries and then only writes an error turn item, so the native question stays open and a later thread send does not answer it. OpenCode v2 is not affected.", "outcome": "open", "file": "apps/server/src/orchestration-v2/DelegatedTaskQuestionReactor.ts", "line": 77, "check": "Read-only review of head 96c8934b85b0 by a fresh Grok 4.7 session on 2026-11-28, finished 06:33Z. No test was run by the reviewer."}]}This records a review that already ran, not a new one. The finished Grok 4.7 review of the private-notes guard (t3code pull request 245) completed at 2026-11-28T06:33:34Z and its result never reached the owner, whose thread died on the Claude weekly limit. The review checkout on r720 ( |
STARTScope: repair only delegated child question refusal for OpenCode 1.x, with a failing-before/passing-after regression test. Exact starting head: 96c8934; base a7ed817. No rebase, merge, new PR, or review record. Remote head verified, clean worktree, working on fix/clo-1087-private-notes-and-child-questions. |
CHECKPOINTHead remains 96c8934; production source unchanged. Extended the existing reactor test for codex/opencode, attached a provider session so the driver is exercised, and asserted the runtime-request.respond effect includes cancellation plus refusal answers. Before-fix command (Node 26.13.1): vp test run apps/server/src/orchestration-v2/Orchestrator.control-reads.test.ts -t "delegated .* question wakes once". Result: 1 failed (OpenCode missing answers), 1 passed (Codex), 36 skipped. Earlier Node 22 attempt stopped at test setup; dependencies and pinned Node are now available. Planned repair: reuse the reactor refusal-answer path for OpenCode; v2 already cancels on decision cancel regardless of answers. |
CHECKPOINTHead 96c8934 plus the scoped working diff: one production-line change includes OpenCode in refusalAnswers; the existing reactor regression now verifies Codex/OpenCode delivery payloads. Before-fix focused command reproduced the same missing-answers failure twice (1 failed OpenCode, 1 passed Codex, 36 skipped each time). After-fix identical command passed (2 passed, 36 skipped; exit 0): vp test run apps/server/src/orchestration-v2/Orchestrator.control-reads.test.ts -t "delegated .* question wakes once" under Node 26.13.1. Guarded repair attempt 1 passed. Required check:changed is running against the original head, with only the two intended files in the diff. No live OpenCode process was exercised; source confirms v1 question.reply accepts answers and v2 still cancels on decision cancel. |
Include refusal answers in delegated OpenCode question responses so the v1 adapter can reply and close the native question. Keep the cancellation decision used by v2. Exercise Codex and OpenCode in the existing reactor test and assert the provider response includes the refusal answers. Model: codex/gpt-6.1-sol Task: fix Agent: Codex Harness: t3/codex Co-Authored-By: Codex <[email protected]>
CHECKPOINTCommitted the scoped repair as 0fe0995, direct parent 96c8934, on fix/clo-1087-private-notes-and-child-questions. Exactly two intended files changed; clean worktree; commit ends with Co-Authored-By. Focused regression passed (2 cases), formatting/lint/server GraphQL generation and all 3 affected-package typechecks passed. check:changed and the commit hook reported out-of-scope Knip errors: two unused .github version scripts and five unused exports in AgentOutputGate.ts, RemoteDelegation.ts, and secretRedaction.ts. No finding was repaired outside scope. The first commit attempt stopped at Knip after format/lint passed; the successful commit used the documented per-command VP_GIT_HOOKS=0 skip. The full changed test file plus required AgentContextBudget check are still running. No merge, new PR, or review record. |
RESULTTask complete: fixed only the delegated-child live-question refusal defect for OpenCode 1.x and pushed commit 0fe0995 to the existing fix/clo-1087-private-notes-and-child-questions branch. PR #245 and remote branch both read back at that exact SHA. Its parent is the required 96c8934; base remains a7ed817. No rebase, merge, new PR, or review record. Clean worktree; commit ends with Co-Authored-By. Files: apps/server/src/orchestration-v2/DelegatedTaskQuestionReactor.ts (include opencode in refusal-answer generation) and apps/server/src/orchestration-v2/Orchestrator.control-reads.test.ts (exercise Codex/OpenCode with attached provider sessions and assert decision plus refusal answers in the queued provider response). Before/after command, under Node 26.13.1: vp test run apps/server/src/orchestration-v2/Orchestrator.control-reads.test.ts -t "delegated .* question wakes once". Before: identical missing-answers assertion reproduced twice, each 1 failed OpenCode, 1 passed Codex, 36 skipped. After: 2 passed, 36 skipped, exit 0. Required command: vp run check:changed 96c8934 --concurrency 2. Format, lint, server GraphQL generation, all 3 affected-package typechecks, and both selected test files passed (40 tests, including all 38 control-reads cases). Overall exit 1 only for out-of-scope Knip findings: unused .github/scripts/set-mobile-version.cjs and set-release-version.cjs; unused isOutputGateBounceMessageId/isAgentOriginatedWake in AgentOutputGate.ts, REMOTE_PEER_UNREACHABLE_THRESHOLD/PeerUnreachableThreshold in RemoteDelegation.ts, and isCredentialKeyName in secretRedaction.ts. These files were unchanged. Commit hook also failed on Knip after format/lint passed; commit used documented per-command VP_GIT_HOOKS=0. Push succeeded; its pre-push hook skipped checks because that shell had Node 22, while the reported checks had already run under Node 26.13.1. Unverified: no live OpenCode 1.x or v2 session was exercised, and remote CI was not awaited. Source inspection confirmed v1 delivers question.reply when answers are present and clears pending state on question.replied; v2 still cancels on decision cancel regardless of supplied answers. No provider adapter file changed. Repair guard attempt 1 passed; local state is /home/primary/.local/state/closura/repairs/t3code-pr245-opencode-v1-question-refusal.json. |
{
"reviewed_base": "a7ed817dfd2eeb0c625f99fbefe90b77298b71e2",
"reviewed_head": "0fe0995a3500857449999ab67a6acb4df7b86ea2",
"reviewer": "codex/gpt-6.1-sol, t3/codex",
"author_session": "mcp:5740c779-956b-4ac3-8faf-c0f70f6a2bad",
"reviewer_session": "mcp:launch:0141a3319608f9a59e96d8258db71a67bdb96d05ba11c3ee47f68c0472a5da32",
"fresh_context": true,
"review_kind": "focused_recheck",
"round_id": "thread:delegated-task:command:mcp:68595c55-9484-49ad-89ce-82c0da02cb15:delegate-task:733281e4-5dc5-473b-b41d-f8acfaa1cee1",
"intent": ["Refusing a delegated child's live question also resumes OpenCode 1.x, so the native question is closed and the child is not left blocked."],
"prior_findings": ["F1"],
"findings": [
{
"id": "F1",
"severity": "important",
"outcome": "confirmed",
"rechecked_head": "0fe0995a3500857449999ab67a6acb4df7b86ea2",
"file": "apps/server/src/orchestration-v2/DelegatedTaskQuestionReactor.ts",
"line": 78,
"summary": "The refusal now builds answers for the opencode driver as well as codex, and the OpenCode 1.x adapter replies to the native question and clears its pending request. OpenCode v2 still cancels on the decision and is unchanged."
}
]
} |
… item first (CLO-1087) A provider's settlement echo for a request the server already refused carried no decision and replaced the stored cancel, so the delegated-task reactor dropped the parent's queued wake. The ingestor now keeps a stored cancel decision and answers when the echo omits them. Muse published the runtime request before the turn item that carries the question ids, so an early refusal had no answers to send and Muse rejected it. The item is now published first. Model: claude/claude-sonnet-5-5 Task: bugfix Agent: Claude Code Lane: claude Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
…questions first (CLO-1087) An approval redirect and the new-task composer skipped note parsing, so "/note ..." could reach the agent as approval feedback or the first prompt. Both now refuse it with an alert. Pi published the pending request before its question item, so an early refusal woke the parent with only a request id. The item is now first, matching Muse. Model: claude/claude-sonnet-5-5 Task: bugfix Agent: Claude Code Lane: claude Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
CHECKPOINTHEAD 4c86965. Node v26.13.1 dependencies installed. Only two regression test files changed; implementation remains unchanged for the failing-before run. |
STARTG1/G2 repair only. Verified local HEAD 4c86965 after authorized fast-forward. Preserve both existing commits; prove provider-native child question notification and delegated standing-persona refusal with failing-before/passing-after tests. No merge or review-gate record. |
…n items first (CLO-1087) An older mobile build could queue "/note ..." text offline. The updated outbox replayed it as an ordinary user message with no humanNote flag, so it reached the agent even when the server lacks capabilities.humanNote. Both outbox delivery paths now hand such text back to the draft instead of sending it. The shared ACP adapter (Grok and other ACP drivers) published the question's runtime request before its turn item, so a child-question refusal woke the parent without the question text. The item now goes first, as in the Muse and Pi adapters. Model: claude/claude-sonnet-5-5 Task: bugfix Agent: Claude Code Lane: claude Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
CHECKPOINTFailing-before proof at HEAD 4c86965 with implementation unchanged, Node v26.13.1. Command: vp test run apps/server/src/orchestration-v2/Orchestrator.control-reads.test.ts apps/server/src/mcp/McpToolAccess.test.ts -t "provider-native subagent question|subagent setting a standing persona". Both runs exited 1: Test Files 2 failed (2); Tests 2 failed | 123 skipped (125). G1: expected [] to have a length of 1 but got +0, after verifying child decision cancel. G2: expected false to be true, because child set_standing executed successfully. First duration 58.08s; repeat 59.87s. All four planned repair paths are already among the PR files, so the repair adds zero paths to the size gate. |
CHECKPOINTPassing-after focused proof on the G1/G2 working diff atop HEAD 4c86965, Node v26.13.1. Same command and same regression tests as failing-before: Test Files 2 passed (2); Tests 2 passed | 123 skipped (125); duration 91.51s; exit 0. Both repair guards recorded attempt 1 passed, with state at ~/.local/state/closura/repairs/clo-1087-g1.json and clo-1087-g2.json. Required check:changed against the exact starting head is now running. Four existing PR paths modified; no new paths. |
…uestion hide, give OpenCode v2 the refusal text (CLO-1087) - Mobile: a successful /note send cleared the whole draft when its text was unchanged, discarding an attachment pasted while the request was in flight. It now clears only the note text in that case. - client-runtime: stop hiding user-input cards on subagent threads. The server refusal already leaves the request non-pending, and hiding the card stranded the question on servers without the reactor. - OpenCode v2: a cancel that carries refusal text now passes it as the form cancel message, so the agent is told why instead of aborting the step. Model: claude/claude-sonnet-5-5 Task: bugfix Agent: Claude Code Lane: claude Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
CHECKPOINTRequired check:changed 4c86965 completed for the four-file G1/G2 diff. PASS format, lint, GraphQL, typecheck (3 packages), test (3 files: 127 passed). Exit 1 solely for the pre-existing Knip findings explicitly named by the caller: unused .github/scripts/set-mobile-version.cjs and set-release-version.cjs, and five exports in AgentOutputGate.ts, RemoteDelegation.ts, secretRedaction.ts. Those files are unchanged. No paths added to the PR. Normal commit hook is being attempted before using the authorized known-Knip bypass. |
RESULTTASK BLOCKED AT PUSH. G1/G2 repair committed locally as a99ef23c0dcf2e966d38e2014e1c194bb8ea0b71 atop authorized 4c86965. Before push, target remote branch unexpectedly advanced to 682dbd7. No push or history rewrite; parent notified to resolve head/ownership and authorize continuation. Four changed paths are already in this PR, adding zero paths. Both focused regressions failed twice before the fix (2 failed), then passed (2 passed). Required checks: 127 tests passed across 3 files; format, lint, GraphQL and 3-package typecheck passed. Only the caller-listed pre-existing Knip findings failed. Normal commit hook failed solely on known unused release scripts; authorized VP_GIT_HOOKS=0 used for commit. Failing-before output: #245 (comment) ; passing-after output: #245 (comment) . Remote new-head checks/reviews and live provider behavior unverified. No merge or review-gate record. |
STARTAuthorized continuation: rebase only local G1/G2 repair commit a99ef23c0dcf2e966d38e2014e1c194bb8ea0b71 onto verified origin head 682dbd7. Preserve the two intervening commits. Stop on conflict or further branch movement. Push normally, then rerun the two focused regressions on the pushed head. No merge or review-gate record. |
Recovery of a /note queued by an older build merged it after ordinary draft text, where it no longer parses as a note, so the next send would hand it to an agent on a server without humanNote. When the thread draft already has text, the note is removed from the queue and shown in the composer error instead. Model: claude/claude-sonnet-5-5 Task: bugfix Agent: Claude Code Lane: claude Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
CHECKPOINTRebased only repair commit a99ef23c0dcf2e966d38e2014e1c194bb8ea0b71 to 695c6a63fd50df08265acf20ecd20e31f49916cd without conflicts. Parent verified exactly 682dbd7. git range-diff 4c86965..a99ef23c0dcf2e966d38e2014e1c194bb8ea0b71 682dbd7..HEAD reports the patch equal. Required check:changed against the new base is running before push. No other commits rewritten; worktree clean. |
…of an error banner A queued /note from an older build, recovered while the draft already had text, was removed from the queue and kept only in an in-memory error banner, so a send, a second recovery or an app restart lost it. Put the note first in the persisted draft: the whole draft then parses as a note, so nothing reaches the agent, and the text survives. Model: claude/claude-sonnet-5-5 Task: bugfix Agent: Claude Code Lane: claude Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
RESULTRESULT: stopped without completion at the delegating thread’s instruction after the remote branch moved again. Nothing was pushed. Clean local branch t3/clo-1087-child-question-standing-guards remains at 695c6a63fd50df08265acf20ecd20e31f49916cd, parent exactly 682dbd7. The authorized rebase had no conflicts; range-diff showed an identical repair patch. No subsequent rebase or commit was made. The check run already in progress completed: vp run check:changed 682dbd7 with Node v26.13.1 passed format, lint, GraphQL, typecheck for 3 packages, and all 127 tests across 3 files, including both G1/G2 regressions. Exit 1 came only from the previously identified Knip baseline: 2 unused release scripts and 5 unused exports in AgentOutputGate.ts, RemoteDelegation.ts and secretRedaction.ts. No affected baseline files were changed. The local repair changes 4 existing PR paths and adds zero paths. Remote fddd38e is reported by the delegating thread; it was not fetched or integrated after the stop. Push and any tests after a push remain undone. Awaiting explicit direction; no merge or review-gate record. secret_scan: not_performed. |
Problem
Follow-up to #171 for the T3 release audit (Linear CLO-1087). Two gaps remained on
release/native-0.1.10:/noteagainst a server that does not advertisecapabilities.humanNote. An older server treats the private note as a normal prompt and would send it to the agent. (The web half landed upstream in fix(chat): refuse /note before sending to a server without humanNote (CLO-1105) #236, CLO-1105, and was dropped from this PR on merge.)t3_environment_link,t3_feedbackandt3_thread_update(route)into a founder inbox. A provider-native childuser_inputquestion also left a pending founder question card and at3_pending_request(respond)wake that could deadlock.Change
/noteis shown disabled with a reason on mobile when the connected server omitshumanNote; the draft is kept. Mobile:ThreadComposer,use-composer-command-menu,use-thread-composer-state. Client-runtime capability handling and mobile i18n strings added for all locales. Web/notegating comes from fix(chat): refuse /note before sending to a server without humanNote (CLO-1105) #236.t3_environment_linkandt3_feedbackare hidden from and refused for subagents;t3_thread_updatewithrouteto a non-agent-only audience is refused for subagents likerequest_decision.DelegatedTaskQuestionReactorrefuses a childuser_inputquestion (cancel, plus a refusal answer for drivers that take answers), then wakes the parent with the question text and tells it to answer the child witht3_thread_send. It also catches up questions pending at startup. The reactor's stored cancel decision survives a provider echo (ProviderEventIngestor), the OpenCode v1 refusal carries answers, and the Muse, Pi and shared ACP (Grok) adapters publish a question's turn item before its runtime request so the parent's wake has the question text./notetext as a message when the server lackshumanNote: the composer's approval-redirect path, the new-task screen and both outbox delivery paths (for entries queued by an older build) hand it back instead.Deploy: none
Scope
Bug fixes from the release audit; no new features. Separate PR owns
ws.ts,PeerMcpClient.ts,RestartBackgroundNote.tsandRunExecutionService.ts.Verification
Run on head
8d6f53d5ff:effect-tsgo tsrs --noEmit): mobile andprovider-acpexit 0 (suggestions only).src/state: 37 files, 373 tests passed, including new tests that/notetext is never sent through an approval redirect and that outbox entries carrying/noteare handed back for both existing threads and new tasks (both fail without the guards).provider-acp110 andprovider-grok96 tests passed.ProviderEventIngestortest that a provider echo does not erase a cancel decision (fails without the fix); earlier on this branch: serverMcpToolAccess,Orchestrator.control-reads,OrchestratorMcpService, client-runtimecommands,composerDispatch,threadRequests.vp fmtclean on the files this round touched;vp fmt --checkelsewhere reports 12 unformatted files this PR does not touch.projectGrouping.test.ts(load balancing), a file this PR does not touch; not investigated.*.browser.test.tsx,qa/check-map.ts, and live clients or live provider-native question behavior.Review rounds
f16356b0b5): two important issues fixed and re-checked: an assignee-onlyt3_thread_update routeto a human bypassed the child guard; a blockingdelegate_taskwait lost the child's question once its card was refused.0fe0995a35,02471f474d,4c86965747): cross-family reviews (GPT-6.2-Sol, Grok 4.7) found, and this PR fixed, the stored cancel being erased by a provider echo, the OpenCode v1 refusal lacking answers, emit order in Muse, Pi and ACP,/noteleaking through the mobile approval redirect and new-task paths, and outbox replay of/notetext queued by an older build.create_threadsort3_thread_launchwithinboxset;refuseChildQuestionis not wrapped incatchCause; the denial message wording; and the wake isqueue_after_active, so a parent blocked in a wait sees the question after its current run ends, and if the child settles first the queued wake is cancelled and only the child's result arrives.Prior art
Searched: 2026-11-27, this repo's own MCP access layer, reactor and capability contract.
McpToolAccess.withoutSubagentsand the existinghidden*visibility helpers (two new composed helpers only).runtime-request.respondcommand for the refusal rather than a new path.humanNotecapability from fix(t3): guard private notes and child question tools #171 for the UI gate.Model: claude/claude-sonnet-5-5
Task: bugfix
Agent: Claude Code
Lane: claude
🤖 Generated with Claude Code