Repository navigation
fix(agents): isolate network-backed dynamic tool results and errors - #118729
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 3, 2026, 1:09 PM ET / 17:09 UTC. ClawSweeper reviewWhat this changesThe PR records network-backed dynamic-tool execution and wraps only model-visible results or errors across direct Tool Search calls, legacy Code Mode, and resumed Code Mode executions while preserving structured values and trusted cancellation. Merge readinessThis remains necessary: current Priority: P1 Review scores
Verification
How this fits togetherDynamic plugin tools run through the shared Tool Search runtime for agent calls and Code Mode bridges. Their structured results remain available to runtime consumers, while control results and errors are projected into text consumed by the model and need an explicit external-content boundary when network-derived content was observed. flowchart LR
A[Dynamic plugin tool] --> B[Shared Tool Search runtime]
B --> C[Network provenance state]
C --> D[Direct call or Code Mode result]
D --> E[Model-visible control projection]
E --> F[External-content boundary]
F --> G[Agent model]
B --> H[Structured runtime value]
Decision needed
Why: The patch appears to use the right OpenClaw owner boundary, but repository policy expressly requires direct Codex source inspection before a verdict on Codex-related behavior, and this protected security-boundary PR still has incomplete current-head CI. Before merge
Findings
Agent review detailsSecurityNeeds attention: The patch contains a focused defensive boundary and no supply-chain change, but a required direct Codex protocol/runtime inspection is unavailable in this environment. PR surfaceSource +134, Tests +683. Total +817 across 8 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep provenance at the shared dynamic invocation owner, project the external-content boundary only when a network-backed call was actually observed, and obtain a direct Codex-source review plus current-head green validation before merge. Do we have a high-confidence way to reproduce the issue? Yes — the added focused tests construct Is this the best way to solve the issue? Unclear — the shared runtime is the strongest apparent owner because it observes the tool invocation before the control projections, but a direct sibling Codex-source check is still mandatory before calling this the best final boundary. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 94f431417b25. 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 (3 earlier review cycles) |
…0803-dynamic-tool-network-boundary
|
Merged via squash.
|
…penclaw#118729) * fix(agents): isolate network-backed dynamic tool results and failures * test(agents): retain literal text result types in dynamic tool fixtures
Summary
Canonical owner and dependency contract
The shared dynamic tool runtime previously erased network provenance before outer control results were projected into model-visible text. Its canonical invocation owner now tracks network observation through suspension/resume and wraps only model-facing content. Protected replacement errors preserve safe name/code/status while excluding hostile inherited causes, getters and Proxy traps; pre-execution policy failures and true aborts remain trusted.
Personally inspected the mandatory sibling Codex source: ../codex/codex-rs/protocol/src/dynamic_tools.rs:58-75, ../codex/codex-rs/app-server/src/dynamic_tools.rs:37-46, ../codex/codex-rs/core/src/tools/handlers/dynamic.rs:150-160, and ../codex/codex-rs/core/src/tools/context_tests.rs:235-268. The Codex wire carries only contentItems plus success, so protection belongs in OpenClaw's model-facing projection owner.
Actual production runtime proof: zero external network
Executed complete production Tool Search, embedded adapter, actual Codex app-server bridge, actual Copilot SDK bridge, and real QuickJS/WASI suspend/resume worker against a synthetic in-memory network-marked plugin. No external network, provider, credential, mocked runtime adapter, or real user content was used.
Suspended exec correctly stays unwrapped before network observation; only resumed wait gains the boundary.
Verification