Skip to content

fix(agents): omit unconfigured Gateway computer target from surface - #178783

Merged
steipete merged 3 commits into
openclaw:mainfrom
HeZ2z:fix/computer-tool-gateway-target-v2
Oct 26, 2026
Merged

steipete merged 3 commits into
openclaw:mainfrom
HeZ2z:fix/computer-tool-gateway-target-v2

Conversation

@HeZ2z

@HeZ2z HeZ2z commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

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

  • Current-main baseline ca6b84a913c3b6d338bbefa2b2ef605a194f3ae2, with the regressions and without the fix: guidance incorrectly advertised a Gateway desktop; schema expected ["node"] but received ["gateway", "node"].
  • With the fix: 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=1 passed 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).
  • Targeted oxlint, formatting for all eight changed files, and git diff --check passed. pnpm prompt:snapshots:gen completed with no generated delta.
  • Local targeted typechecking refused the linked dependency installation (Declaration input escapes checkout); exact-head PR CI supplies broad type/build proof.
  • Contributor-recorded live proof on 7a06b1c29e0d0bf75b2a0679dbecd81f6868939c: an isolated Gateway with no computer provider advertised target.enum: ["node"]; an owner-started openclaw agent turn used an approved Windows node to execute an omitted-target screenshot and returned Screenshot taken. The model was deterministic, so this establishes publication and dispatch, not model-choice frequency.
  • Live desktop proof was not repeated for the plumbing simplification: this Mac has no isolated paired Windows desktop, and constructing another cross-platform harness is outside the bounded live-proof pass. The production-boundary regression verifies publication and omitted-target node dispatch on this revision.

Exact-head CI run 40376678279 has one inherited failure: check-test-types-core-2 (job 121763857799), where unchanged reply-agent-turn-preparation.test.ts:646 supplies an incomplete ReplyOperation. Scheduled main run 40380874869 at d704d3b10632 fails with the identical signature (job 121776725394). ClawSweeper reviewed this final head with no findings.

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.
@clawsweeper

clawsweeper Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation agents Agent runtime and tooling size: S labels Oct 20, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 20, 2026
@clawsweeper

clawsweeper Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This 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.

  • Before: The model sees target values gateway and node and can start with an unavailable Gateway call.
  • After: The model sees target.enum ["node"], and an omitted-target screenshot reaches the paired desktop.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair with applicable shipped-entry-point proof, reported base-failing regressions, and no actionable findings; broad exact-head CI is still pending.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (live_output): Retained contributor live output on 7a06b1c covers an isolated Gateway with no provider, node-only schema publication, and an openclaw agent omitted-target screenshot on an approved Windows node returning Screenshot taken.; the reviewed refactor preserves that behavior, so this bounded proof remains applicable without claiming model-choice frequency or a fresh live run.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Desktop turns can start with an unavailable Gateway call even though a paired node provides the usable screen.
Reason: Accurate capability publication removes an avoidable failure without changing desktop routing defaults, persisted preferences, or authorization.

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
Reviewed head: c784809f5f48ae09c349fb2fece8af476fddb82a

Before merge

None.

Findings

None.

Agent review details

How this fits together

The 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]
Loading

Technical review

Best 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

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • oywino: Raw commit df76050 adds src/agents/tools/computer-tool.ts:64 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: df760503c1bf; files: src/agents/tools/computer-tool.ts)

PR surface

Source +13, Tests +52, Docs 0. Total +65 across 8 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 4 26 13 +13
Tests 3 52 0 +52
Docs 1 1 1 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 8 79 14 +65

Labels

Label changes:

No label changes.

Label justifications:

  • P2: The bug adds a recoverable failed computer call when an available paired desktop should be selected.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (3 earlier review cycles)
  • reviewed 2026-10-20T21:32:30.516Z sha 7a06b1c :: needs real behavior proof before merge. :: none
  • reviewed 2026-10-20T22:40:23.493Z sha 7a06b1c :: needs real behavior proof before merge. :: none
  • reviewed 2026-10-20T22:49:55.965Z sha 7a06b1c :: needs maintainer review before merge. :: none

Reviewed October 26, 2026, 2:26 PM ET / 18:26 UTC (Revision 4).

@HeZ2z

HeZ2z commented Oct 20, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Oct 20, 2026
@HeZ2z

HeZ2z commented Oct 20, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Oct 20, 2026
@clawsweeper clawsweeper Bot removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Oct 20, 2026
@steipete

Copy link
Copy Markdown
Contributor

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 26, 2026
@steipete
steipete merged commit 394ce38 into openclaw:main Oct 26, 2026
144 of 149 checks passed
@steipete

Copy link
Copy Markdown
Contributor

Merged via explicitly authorized admin squash with attributed pre-existing CI failures.

@HeZ2z
HeZ2z deleted the fix/computer-tool-gateway-target-v2 branch October 27, 2026 03:00
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 27, 2026
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling docs Improvements or additions to documentation P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

computer tool: models pick target: "gateway" on hosts where only a paired node has a screen

2 participants