Repository navigation
fix(computer): avoid extra observation turns after window actions - #146822
Conversation
|
🦞👀 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. Reviewed September 13, 2026, 7:23 AM ET / 11:23 UTC (Revision 5). ClawSweeper reviewWhat this changesThe computer tool returns fresh window images and element references after supported window actions while preserving the original action outcome. Merge readiness✅ Ready for maintainer review The fix remains useful: current main still requires a separate window observation after input. No actionable patch defect was found, and this maintainer-authored PR is protected from automatic closure. Priority: P2 Review scores
Verification
How this fits togetherThe computer tool translates agent actions into commands for a paired or session-bound desktop. Provider observations return images and references that ground the agent’s next action. flowchart TD
A[Agent window action] --> B[Computer tool]
B --> C[Desktop provider]
C --> D[Original action outcome]
D --> E{Window observation supported?}
E -->|Yes| F[Fresh window image and references]
E -->|No| G[Desktop screenshot]
F --> H[Next agent action]
G --> H
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +63, Tests +328, Docs +2. Total +393 across 9 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep post-action observation in the shared computer tool, using the existing window-read contract and preserving mutation evidence when refresh fails. Do we have a high-confidence way to reproduce the issue? Yes: current main’s targeted input path returns a desktop screenshot without new window references, requiring another get_window_state call before continuing. Source establishes that path; this review did not execute it. Is this the best way to solve the issue? Yes: composing the existing window observation in the existing post-action owner is a focused repair, and the patch preserves inline observations, browser behavior, and action evidence. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against c1191cf5c9b2. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (4 earlier review cycles)
|
275cd98 to
c5faee8
Compare
|
@clawsweeper re-review Please review current head |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
* temp/pr-146799: (70 commits) test: reuse explicit fallback config fixtures (openclaw#146948) fix(computer): return fresh window observations after actions (openclaw#146822) refactor(feishu): remove unreachable requester topic selection (openclaw#146904) improve(gateway): reduce CPU spent listing agent-owned sessions (openclaw#137745) fix(ui): avoid recapturing chat drafts during UI updates (openclaw#146884) fix(ui): show system uptime in the debug overlay (openclaw#146960) fix(retry): honor waits beyond the native timer limit (openclaw#145718) fix(ui): keep chat history idle when run status changes (openclaw#146802) fix(ui): reuse persisted text during chat streaming (openclaw#146831) refactor(qa): share harness drift result construction (openclaw#146903) test(agents): coordinate settings lock contention (openclaw#146949) fix(worker): avoid repeatedly serializing screenshot history (openclaw#146907) fix(secrets): stop buffered upload writes after cancellation (openclaw#146840) perf(doctor): avoid unnecessary state runtime imports (openclaw#146926) improve: reduce compaction request estimation work (openclaw#146961) fix(ci): wait for forwarded avatar imports before assertions (openclaw#146729) perf(workers): skip configured Git author lookups (openclaw#146833) fix: admit borrowed memory writes through the agent database owner (openclaw#146760) fix(discord): prevent voice playback gaps and stale turn controls (openclaw#146798) improve: reduce worktree filesystem stalls and archive syncs (openclaw#146906) ...
What Problem This Solves
Fixes an extra observation turn after targeted window input: the action returns a desktop screenshot, while the next window action needs fresh window observation IDs and element references.
User Impact
Window actions now return their original outcome followed by a fresh window observation when the provider supports
get_window_state, so the agent can continue using the returned references. Screen-only input and browser observation behavior remain unchanged.Why This Change Was Made
The shared computer tool already owns post-action observation. It now selects the targeted window read through that existing flow, retains the 500 ms settling delay, and uses a separate idempotency namespace for the automatic read. Original input evidence survives a failed follow-up; stale references expire, resized image coordinates stay bound to the fresh observation, and caller cancellation keeps its existing behavior.
Browser act-and-observe is a separate follow-up. This change is not presented as the cause or a measured fix for the sampled screen-only latency incident.
Evidence
c5faee8430e6b5bbee76b5c0d51bc3a10f1b5b51preserves the reviewed production patch from275cd988f35982f092df3d94cfce43af075d0e92after refreshing its base. Test-only presence assertions and a coordinate tuple now satisfy strict indexed-access typing without weakening the checks. Independent review is clear; fresh exact-head CI is pending.275cd988used Node 24.19.0, pnpm 12.3.4, and CUA Driver 0.23.2: eight focused files / 142 tests passed, the original production implementation reproduced the fresh-reference regression, andpnpm buildpassed.src/config/types.secrets.ts. That issue was fixed separately in fix: avoid channel discovery when plugins are disabled #146689 and is included in the refreshed base. No complete manual static-gate pass is claimed.effect=unverifiable, accessibility route, and unknown delivery metadata were preserved. Actual effect was established by observation readback. This is bounded fixture and call-count proof, not an end-to-end Team latency measurement.Production delta: +63 lines for window observation composition and result/idempotency ownership; tests/support +328 lines; docs +2 lines.