Repository navigation
fix(agents): omit unconfigured Gateway computer target from surface - #178783
Conversation
Advertise the computer tool's Gateway target only when the resolved paired surface reports a configured Gateway provider. With configured: false, offer target: node and point guidance at omitted targeting for the sole paired node; the explicit-Gateway error now names the paired-node retry instead of asking for an unwanted provider.
|
🦞👀 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 maintainer review before merge. What this changesThis PR hides the Gateway computer target when no provider is configured and explains how to select a paired desktop. Example: An unconfigured Gateway has one connected Windows computer-capable node.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it fixes a current capability-publication bug, preserves explicit desktop selection, and has no blocking review findings; exact-head CI remains pending. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe computer-tool factory turns prepared Gateway and node capabilities into model-facing schemas and guidance; execution resolves the selected desktop through the existing Gateway or paired-node transport. flowchart TD
A[Gateway provider status] --> C[Prepared computer surface]
B[Paired node inventory] --> C
C --> D[Computer tool schema and guidance]
D --> E[Agent computer call]
E --> F[Existing desktop binding and transport]
Technical reviewBest possible solution: Use the existing prepared computer status to publish accurate targets while retaining explicit host selection and paired-node recovery guidance. Do we have a high-confidence way to reproduce the issue? Current-main source establishes that the schema advertises gateway even with no configured provider and that an explicit Gateway selection fails before node discovery; model-choice frequency remains reporter evidence. Is this the best way to solve the issue? The patch addresses capability publication at its existing owner, preserves configured and session-owned desktops, and avoids silently redirecting an explicit host choice. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 71eacdfe9b5b. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +13, Tests +52, Docs 0. Total +65 across 8 files. Added test files: 0. View PR surface stats
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 October 26, 2026, 2:26 PM ET / 18:26 UTC (Revision 4). |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
…penclaw#178783) Omit the Gateway computer target when prepared capabilities report no configured Gateway desktop. Share a node-only target scope across schema, guidance, bindings and cache identity, preserving configured and session-owned desktop behavior. Closes openclaw#178604 Supersedes openclaw#178744 Validation: schema and guidance regressions fail on the baseline; all 91 focused tests pass, including routing and prompt-prefix stability. The exact-head CI failure in run 40376678279 is the unrelated ReplyOperation fixture error reproduced by scheduled main run 40380874869 and subsequently fixed by openclaw#184907. Live-proof scope is recorded in the PR. Co-authored-by: HeZ2z <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
What Problem This Solves
Closes #178604. Supersedes #178744.
Desktop turns can select an unavailable Gateway computer even when the only usable desktop belongs to a paired node, causing an avoidable failed first call.
User Impact
When no Gateway computer provider is configured, the computer tool advertises only the paired-node target and explains automatic selection. Explicit Gateway selection still fails without redirecting input, with a useful paired-node retry message. Configured and session-owned desktops keep their existing behavior.
Why This Change Was Made
The existing prepared Gateway status now selects a node-only target scope. Schema caching and guidance consume that same scope, so no separate configuration flag or cache owner is needed. Unknown Gateway status retains the existing target surface.
Thanks to @HeZ2z for the fix and original desktop proof. The revision simplifies the target-scope plumbing and removes a duplicate failed-call assertion. Relative to the integrated main baseline: production +13 lines, tests +52, documentation net 0. The remaining production growth expresses the missing scope and recovery guidance; unrelated cleanup is excluded.
Evidence
ca6b84a913c3b6d338bbefa2b2ef605a194f3ae2, with the regressions and without the fix: guidance incorrectly advertised a Gateway desktop; schema expected["node"]but received["gateway", "node"].node scripts/run-vitest.mjs src/agents/tools/computer-tool.schema.test.ts src/agents/tools/computer-tool.gateway.test.ts src/agents/tools/computer-tool-guidance.test.ts src/agents/tools/computer-tool.node-resolution.test.ts src/agents/agent-tools.prefix-stability.test.ts --maxWorkers=1passed all 91 tests. Four runner shards took 147.57 seconds wall time on the loaded host; schema shard 38.65 seconds, guidance 0.364 seconds, prefix shard 65.60 seconds, routing/Gateway shard 19.08 seconds (mostly import/transform time).git diff --checkpassed.pnpm prompt:snapshots:gencompleted with no generated delta.Declaration input escapes checkout); exact-head PR CI supplies broad type/build proof.7a06b1c29e0d0bf75b2a0679dbecd81f6868939c: an isolated Gateway with no computer provider advertisedtarget.enum: ["node"]; an owner-startedopenclaw agentturn used an approved Windows node to execute an omitted-target screenshot and returnedScreenshot taken.The model was deterministic, so this establishes publication and dispatch, not model-choice frequency.Exact-head CI run 40376678279 has one inherited failure:
check-test-types-core-2(job 121763857799), where unchangedreply-agent-turn-preparation.test.ts:646supplies an incompleteReplyOperation. Scheduled main run 40380874869 atd704d3b10632fails with the identical signature (job 121776725394). ClawSweeper reviewed this final head with no findings.