Repository navigation
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 real behavior proof before merge. What this changesPreserve a source-bound message allowance for verified private CLI completions under restrictive tool profiles. Example: A Claude CLI requester using the coding profile receives a private child result for Telegram chat 555000111.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 6 items remain This PR addresses a remaining delivery failure and repairs both previous findings, but its completion-only catalog expansion introduces a CLI session-continuity regression. Priority: P1 Before merge
Findings
Provenance
Tests
Agent review detailsHow this fits togetherThe command attempt verifies a child-completion handoff, projects requester policy into a CLI MCP grant, and exposes message execution through the Gateway to the channel transport. flowchart LR
A[Private child result] --> B[Verified requester handoff]
B --> C[Command tool policy]
C --> D[CLI MCP grant]
D --> E[Gateway tool projection]
E --> F[Source reply guard]
F --> G[Telegram transport]
Technical reviewBest possible solution: Keep the existing completion and message-policy owners, but expose a stable session catalog and gate the additional source-bound message permission at execution. Do we have a high-confidence way to reproduce the issue? Current-main source shows private automatic completions missing the message allowance under coding; no current-head runtime reproduction is supplied. Is this the best way to solve the issue? Reusing the existing source guard and policy merger is appropriate, but changing the completion catalog violates the established CLI continuity contract. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 9651d6347b1a. Merge-risk optionsMaintainer options:
Provenance checked
TestingProof path: none. SecurityNeeds attention: No concrete authorization bypass was found, but the expanded grant needs final-effect containment evidence and the enforced current-head maintainer approval. EvidenceWhat I checked:
PR surfaceSource +38, Tests +664, Docs +7, Other +2. Total +711 across 15 files. Added test files: 1. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel changes: No label 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 HistoryReview history (3 earlier review cycles)
Reviewed November 6, 2026, 2:54 PM ET / 19:54 UTC (Revision 4). |
A completionTarget "parent" handoff runs with delivery disabled, so the requester's final reply stays internal and any user-facing update has to go through the message tool. CLI requesters never retain their tool surface on a completion handoff and ran tool-free, so the result could not reach the user. Grant the same policy-checked message capability used by message-tool-only handoffs to trusted private completions on CLI runtimes. Announce delivery, embedded runtimes, and policy denies are unchanged. The grant needs the CLI runtime decision earlier in runAgentAttempt; the unchanged selection moves into attempt-cli-runtime.ts so the over-cap attempt-execution.ts does not grow.
904ddf7 to
dd2ed04
Compare
…ndary Drive a hidden child with completionTarget "parent" through the real Gateway, CLI runner, MCP loopback grant, message tool, and Telegram transport. A protocol child stands in for Claude and calls the MCP endpoint the runner generated; a fixture Bot API records the final sends. An allowed private completion lists exactly `message` and sends once to the requester chat. An operator deny runs the turn without MCP, a disabled Telegram send action returns a tool error, and a grant revoked between listing and calling gets HTTP 401; none of them reaches Telegram. The test needs the host SQLite broker and is release-only, so CI runs it when it changes instead of on every pull request.
Integrate current main, retain existing requester permissions, and carry a source-bound completion message allowance through CLI projection. Keep the extra grant out of child and cron inheritance.
|
@clawsweeper re-review Updated to |
|
🦞👀 Re-review progress:
|
|
|
Thanks for the detailed work and the field data in #121661. I'm closing this PR without merging, because the user-facing loss does not reproduce on current main. I ran this end to end on main ( The loss reported in the issue (CLI completion turns ran tool-free, so private results never arrived) was fixed by #162374, which keeps the requester's tools on Claude CLI completion turns. The case that remains is a private completion without a yield, where the requester's own profile has no |
|
Thanks, @obviyus, for taking the time to test this end to end and for the clear explanation. The distinction between restoring the requester’s existing tools and granting additional messaging authority makes sense. With #162374 addressing the original tool-free completion issue, closing this PR is the right call. I appreciate the careful verification and scope clarification! |
Related: #121661
What Problem This Solves
Fixes: a private subagent result can fail to reach the user when the requester uses a restrictive tool profile such as
coding, or a CLI backend that does not retain the full requester tool surface.User Impact
User impact: a verified private completion can relay its result to the requesting conversation through
message, while its final answer stays private. Explicit tool denies, frozen policies, channel action gates, and grant revocation remain authoritative.An additional completion messaging grant is restricted to sends in the original channel, account, conversation, and thread, and cannot become general messaging authority for spawned children or cron jobs. Existing requester permissions are preserved.
Why This Change Was Made
Current main already restores the normal Claude CLI requester tool surface. The remaining repair uses the explicit
privateCompletionflag, carries source restriction independently of automatic final-reply delivery, and keeps the admitted completion allowance through the actual Gateway tool projection. The same policy merge helper preserves explicit denies and frozen allowlists at both stages.The earlier destination-scope rationale in this PR was incorrect. This revision uses the existing source-reply guard for the additional grant. It also follows the current media contract: #176594 permits source-conversation photos and attachments through normal media validation; this PR does not restore the obsolete text-only restriction.
Integrated main at
650091daacdc10aa374e82a6327e8beffe136072to resolve the stale branch conflicts and preserve current runtime selection and requester-tool retention.Evidence
At
bed203a26ff9c7aac301f0bff632b97d23895318(tree30b8d9d69f3d1a9983b45bc4f12f445b877763dc):tsconfig.core.json).git diff --check, and the line-cap ratchet passed.The complete Gateway → private parent completion → CLI runner → minted MCP grant → message tool → Telegram transport fixture passed 5/5 in CI job 128116367053. Only model decisions and external Bot API responses are synthetic. CI checked merge
328504c21532c5402858ade03a23c749cf1aa84e, combining this head with main9651d6347b1ab99453e8e6b5105d10d7800d82dc.The five reported case durations total 122.7 seconds. This expensive composition stays in the release-only tier except for changed-file CI because admission-only tests miss authority lost between projection and dispatch.
The CLI attempt suite, including the new private/coding/other-CLI cases, and MCP grant-context suite also passed. CI lint and all five core test-type stripes passed.
Full CI is red on an unrelated current-main defect: production type checking and some asset-building jobs cannot resolve
extensions/deep-research/browser/client.js. The browser directory has identical filenames and blob SHAs in main9651d634and the tested merge; both lack that module. This PR does not change those files.The CI baseline-ratchet job also confirms the same inherited test-line debt on main
9651d634: total 6,552,688, ceiling 6,552,637, over by 51, PR net delta +663. The separate allocation covers exactly the PR's +663; all other ratchets passed.Local runtime attempts did not start tests: the worker compiler exceeded a 3 GiB cgroup limit, including a retry with a smaller Node heap; a narrow unit selection needed the same compiler and was stopped. The CI run supplies current-head GREEN proof. A fresh full-flow RED control, a real Gemini process, and Telegram Test Server were not run; the older-head live trace is not treated as evidence for this implementation.
Independent Codex source review covered the production and regression changes against
650091daacdc: no actionable findings. This was an independent source review, not an autoreview or ClawSweeper execution. The existing private-delivery owner cases cover suppression of nonempty private final text; the new integration fixture itself returnsNO_REPLY.Simplification retained the existing runtime-selection and policy owners and removed unused photo/document assertions. Against the integrated base: production +38 net lines, regression tests/support +663. The exact 663-line test allocation is justified by the end-to-end authority boundary: admission-only tests miss a grant lost during CLI projection. The expensive integration is release-only except when selected by changed-file CI; the shared test baseline is unchanged.