Repository navigation
fix: let Codex plugin tools recognize direct Control UI input - #208252
Conversation
Co-authored-by: daniel-lxs <[email protected]>
Worked on by: - @daniel-lxs Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: 51b50c8e-e0a5-4a28-a3fc-e8db09b8ad43
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Codex review: passed. What this changesPreserves producer-supplied input provenance and forwards it to plugin tool factories on direct user attempts. Example: An owner sends “hello” through Control UI to a native Codex session.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR repairs a current-main metadata gap, and the pinned diff has no blocking findings. Reviewed head: Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe Gateway stamps user input, the transcript recorder retains its producer facts, and the harness host supplies those facts to plugin tool construction. flowchart LR
A[Control UI input] --> B[Gateway input producer]
B --> C[Transcript recorder]
C --> D[Harness host]
D --> E[Plugin context mapper]
E --> F[Plugin tool factory]
Technical reviewBest possible solution: Land the shared-host metadata repair after required checks pass and reconcile the overlapping factory proposal. Do we have a high-confidence way to reproduce the issue? Current source establishes the recorder-to-factory mismatch, and the PR reports a matching live before/after reproduction; this read-only review did not execute it. Is this the best way to solve the issue? Using the existing recorder owner and shared harness host repairs factory metadata while preserving explicit origins, retry behavior, and separate tool-policy inputs. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 2a428f218211. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +33, Tests +43, Docs +4. Total +80 across 8 files. Added test files: 0. 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. 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:
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 November 29, 2026, 6:00 AM ET / 11:00 UTC. |
* fix: show Claude CLI document uploads only once in chat * fix: show Claude CLI document uploads only once in chat OpenClaw-Publication: 4555cb04-bff2-43b3-aff8-ec271d6567b2 * fix: keep Claude document uploads on the message that sent them * fix: preserve the released message queue result contract Release adaptation: Use an optional accepted-input observer instead of widening queueMessage's released Promise<void> contract. Reuse the stable steering and transcript-rewrite handlers; leave source admission, native image steering, config, and all SQLite schemas unchanged. The existing history index columns also carry exact document correlation. Keep the released model-hook test layout. Companion audit through be407a4: no later #203866 reference. PRs #208535 (Claude compacted fork summaries), #206158 (native subagent status), and #205663 (image dimensions) are separate. PRs #208252 (Codex source), #207022 (embedded prompt dispatch), #206969 (fallback), #205963 (Copilot question policy), and 50a7368 (snooze) do not own this path. SHA mentions in #204700 and #204685 are update/qualification records, not follow-ups. (cherry picked from commit 269f884) Co-authored-by: RomneyDa <[email protected]>
…aw#208252) Pass the input origin recorded by the Gateway to plugin tool factories on direct user attempts. Preserve explicit origins and the separate provenance used for scheduled MCP authority. Closes openclaw#208201 Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: 51b50c8e-e0a5-4a28-a3fc-e8db09b8ad43
Closes #208201
What Problem This Solves
A plugin that requires direct user input can stay disabled on an owner-authenticated Control UI turn. The Gateway records the input as
external_user, but the Codex tool factory gets no origin for that same run.User Impact
The factory receives the origin without guessing from the owner bit. No configuration or migration is required. Input provenance is not consent to perform an action.
Why This Change Was Made
I kept the producer’s origin before transcript hooks can rewrite the message and passed it to the factory only as a fallback for the current user attempt. Explicit origins take precedence. Internal retries and unattributed inputs do not acquire the original user’s stamp.
I found no decision to withhold this metadata from factories. #179816 introduced it as information for plugins. #120366 deliberately distinguishes absent provenance when capturing scheduled MCP authority. I left that policy unchanged. #203467 addresses prompt hooks, not factories.
Evidence
I built main and the published head on Crabbox AWS. On each, I paired a browser as the owner of an isolated Gateway, sent from the Control UI composer in a fresh non-main session, and received the requested live OpenAI reply through native Codex. I matched the browser’s send ID to the stored user input and both invocations of an optional v2 factory that returned
null.8cc7a2cbe4dfade044a0a762external_userexternal_userexternal_userThe regression failed on main with
expected undefined to be 'external_user'. I ran 147 tests across six focused files on55199753a8a5; all passed. Coverage included explicit system input, unattributed input, internal retry, scheduled MCP authority and prompt-prefix stability. Core and harness-test typechecks, targeted lint and formatting passed. I verified the published commit has the identical Git tree and rebuilt and reran the live browser proof on that exact commit. I did not test the reporter’s third-party integration or other harnesses.Contributor: @daniel-lxs
Work sessions
Linked for team reference; these sessions aren’t public.
Worked on by
🦞 Made with OpenClaw