Repository navigation
fix(codex): keep native tool declarations across completion turns - #183286
Conversation
Keep configured native Codex declarations across owner and completion turns, while enforcing current owner authority when the tools execute. Preserve the existing fingerprint workaround and native session settlement behavior. Narrow slice of #179363. Related: #178982. Co-authored-by: Marvinthebored <[email protected]> Co-authored-by: Dallin Romney <[email protected]>
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@clawsweeper re-review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
🦞👀 Re-review progress:
|
|
Codex review: needs real behavior proof before merge. What this changesThis PR keeps seven native Codex tools declared across owner and completion turns while checking owner authority when they execute. Example: A session with user-home access and supervision enabled transitions from an owner turn to a completion turn.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Partial Merge readiness⛔ Blocked before merge - 3 items remain Keep this PR open: it is a focused, maintainer-directed repair for declaration churn still present on main, and no concrete introduced bug was found. Priority: P1 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherThe Codex plugin builds model-facing tools from session configuration; execution passes through invocation, account, session, and AppServer effect guards before native reads or control writes. flowchart TD
A[Session configuration] --> B[Codex tool factories]
B --> C[Stable tool declarations]
C --> D[Native session reuse]
C --> E[Tool invocation]
E --> F[Live owner and session guards]
F --> G[Codex AppServer effects]
Technical reviewBest possible solution: Keep this focused repair in the existing native factories, retaining configuration gates and live authorization at native effects. Do we have a high-confidence way to reproduce the issue? Current source deterministically removes native declarations on nonowner construction and invalidates reuse when the resulting tool-name hash changes; linked reports supply matching reset traces, but this review ran no target code. Is this the best way to solve the issue? Moving turn-dependent admission into the existing execution guards is the smallest complete native-tool repair and preserves genuine configuration-driven catalog changes. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 274a86d02feb. Merge-risk optionsMaintainer options:
Provenance checked
TestingProof path: in-process harness. SecurityNeeds attention: No concrete bypass was found, but the changed supervision admission boundary requires final-effect authorization validation. EvidenceWhat I checked:
PR surfaceSource +5, Tests +27, Docs +2. Total +34 across 7 files. Added test files: 0. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
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 25, 2026, 1:31 AM ET / 05:31 UTC. |
|
Merged via squash.
|
…183286) Narrow slice of #179363. Keep native Codex tool declarations stable across completion turns and enforce current owner authority when tools execute. Preserve the existing four-name fingerprint workaround and the fixes from #182191 and #183059. Validated with the factory regression red on base and green on this head, 104 targeted tests, and exact-head CI. Live transport proof remains a documented gap. Co-authored-by: Marvinthebored <[email protected]> Co-authored-by: Dallin Romney <[email protected]> (cherry picked from commit 6a62821) Adapted for 2026.9.x: native-thread-tool.ts resolved by hand against the 9.x execute layout (owner check at execute entry, in the request-options assertCurrent, and as the binding-clear commit guard; 9.x has no separate prepared session-entry guard). Tests rewritten onto the 9.x fixtures (sync createTool, 9.x supervision registration test).
…penclaw#183286) Narrow slice of openclaw#179363. Keep native Codex tool declarations stable across completion turns and enforce current owner authority when tools execute. Preserve the existing four-name fingerprint workaround and the fixes from openclaw#182191 and openclaw#183059. Validated with the factory regression red on base and green on this head, 104 targeted tests, and exact-head CI. Live transport proof remains a documented gap. Co-authored-by: Marvinthebored <[email protected]> Co-authored-by: Dallin Romney <[email protected]>
…183286) Narrow slice of #179363. Keep native Codex tool declarations stable across completion turns and enforce current owner authority when tools execute. Preserve the existing four-name fingerprint workaround and the fixes from #182191 and #183059. Validated with the factory regression red on base and green on this head, 104 targeted tests, and exact-head CI. Live transport proof remains a documented gap. Co-authored-by: Marvinthebored <[email protected]> Co-authored-by: Dallin Romney <[email protected]> (cherry picked from commit 6a62821) Adapted: applied the native-plugin-tool.test.ts owner-denial hunk inside the release describe block.
…183286) Narrow slice of #179363. Keep native Codex tool declarations stable across completion turns and enforce current owner authority when tools execute. Preserve the existing four-name fingerprint workaround and the fixes from #182191 and #183059. Validated with the factory regression red on base and green on this head, 104 targeted tests, and exact-head CI. Live transport proof remains a documented gap. Co-authored-by: Marvinthebored <[email protected]> Co-authored-by: Dallin Romney <[email protected]> Release adaptation: stable's thread tool lacks main's session-entry current-check capture; applied only the owner-authority move (declare unconditionally, assert owner at execute/commit). Ported the owner-denial cases into stable's test fixtures. (cherry picked from commit 6a62821)
Narrow slice of #179363. Related: #178982.
What Problem This Solves
Fixes native Codex tool declarations disappearing when a session moves from an owner turn to a completion turn, which can disrupt continued use of the native session.
User Impact
Configured native thread, plugin discovery, and supervision tools retain the same declarations across owner and completion turns. Their execution remains restricted to a currently authorized owner.
Why This Change Was Made
The native factories removed tools for nonowner turns even though declaration lifetime belongs to the session. Keep their declarations stable and enforce current owner authority at execution and the existing effect checks. Configuration opt-outs still control availability.
This preserves the four-name fingerprint workaround in
src/agents/cli-runner/prepare.tsand the settlement/continuity fixes from #182191 and #183059. It does not include the catalog, widget, descriptor, or schema changes from #179363.Codex's own contract defines dynamic tools at thread start and restores them from rollout metadata (session owner); a function declaration contains its name, description, and input schema (declaration).
Evidence
--maxWorkers=1). Existing fork/archive and policy-revocation coverage remains green.260f49d7222aefb7bdf6223d0dd64d4ce7c59249: all 55 jobs completed, none failed.Original investigation and contributor work: #179363 by @roboclaw-bot, with @Marvinthebored and Dallin Romney.
Co-authored-by: Marvinthebored [email protected]
Co-authored-by: Dallin Romney [email protected]