Repository navigation
Description
Problem
A Computer Use call returns permission_missing or screen_locked, but Desktop shows a green completed icon. The same call is recorded as isError: false and counted as success in telemetry. Reloading the task preserves the incorrect status.
This surfaced while revisiting A06 (#4909). It is a result-contract problem across production and adaptation boundaries, not just an icon problem.
Two loss points are confirmed on bc9401d670259b87fbc40792ab83ea009c5f623c:
- The producer can omit the failure fact. Some CU permission refusals return only
{ text: "...failed: permission_missing..." }. Runtime classifies that as a successful text result. - The adapter can discard an existing failure fact. Desktop native result projection converts the result into model content. ClientCapabilityCallResult carries only
content/structuredContent, so even an existingerror: 'screen_locked'can disappear before the Host settles the proxy call.
Ordinary MCP converts protocol isError into an exception. Client Capability reuses a similar content shape without that conversion.
Evidence
Controlled reproduction through the real ToolRuntime, CU implementation, SQLite T1/T2 commits and transcript projection:
| Case | Runtime / telemetry | Reopened history |
|---|---|---|
| Accessibility missing, four identical calls | Four successes; all four reach the tool | Four completed results |
screen_locked, direct tool path — control |
Error | Errored |
screen_locked, Desktop adapter/proxy path |
Success | Completed |
outcome_unknown, Desktop adapter/proxy path |
Success | Completed |
Users see success markers beside failure instructions; telemetry and repeated-failure accounting are wrong. Adding the error marker in the direct-path probe blocks the third/fourth attempts, but does not fix the Desktop path.
Permission denied, but four completed icons:
The Desktop adapter loses screen_locked:
The same error through the direct path is correctly shown as failed:
These are real Desktop captures replaying the generated ledger in an isolated profile. Permission/backend inputs and transport were controlled, not a live-model/TCC end-to-end run. Response contents were preserved. The model still receives failure text; no permission bypass or repeated real-world side effect was observed.
Reproduction scripts, full results and all six original screenshots: evidence bundle.
Environment: macOS 26.6.2 arm64, Node 24.20.0, Electron 43.4.1. Twelve scenarios / 21 settlements were consistent across two runs. Existing affected suites: 122 tests pass, without covering this status loss.
Related: #4909 (A06). Result-contract options and the proposed migration are discussed below.
Code inspection, controlled reproduction and drafting assisted by OpenAI Codex.



Activity
testikun commentedon Sep 17, 2026
Design discussion: one tool result contract
@Astro-Han — could you review the result boundary and migration scope below? This is adjacent to #4947's ownership question, scoped here to tool results and Desktop transport.
We considered three directions:
ToolResultclass.Our preferred direction is C. The objective is fewer rules and less code to maintain, not a class hierarchy for its own sake.
Why a shared result class
Today later layers interpret arbitrary
error,kind,statusand model projections. A requiredToolResultmakes the distinctions explicit at the producer:The benefits we want are concrete:
This follows Log Is the Runtime: preserve facts, then project them. Codex's ToolOutput is a useful reference for separating result semantics from model/log/caller representations, not a proposal to copy its entire architecture.
Scope and acceptance
The exact API and implementation slices can follow the discussion of this boundary and full-migration scope.
Code inspection, controlled reproduction and drafting assisted by OpenAI Codex.
testikun commentedon Sep 17, 2026
take
Astro-Han commentedon Sep 17, 2026
Verified both loss points on
main; the bug is real:{ text }only (computer-use-tools.ts:1652), andderiveToolResultStatus(tool-runtime.ts:3413) defaults unlisted content kinds tosuccess; the default is fail-open.ClientCapabilityCallResult(client-capability.ts:76) carries no outcome field, so the Desktop proxy path cannot transport a failure fact even when the producer sets one.What this bug needs is bounded, and it does not need an architectural decision from us to proceed:
errorfield on the raw result or a dedicated content kind) instead of encoding failure in text.ClientCapabilityCallResultgains an outcome field that the Desktop projection preserves, so the fact survives transport to settlement.That is option B's scope, and it is the right fix for this issue. The default-success arm in
deriveToolResultStatusdeserves a second look in the same PR: the failure-streak loop gate depends on it, which is why a text-only failure lets a denied call retry indefinitely. One contract note if you extend the field: carry the tri-state (success/error/aborted), not a boolean, sinceisErroralready collapsesabortedinto error and the code notes it cannot drive live status.On option C: a unified
ToolResultmigration is a separate value proposition and a much larger commitment than this defect requires. This issue is not the venue to settle it, and you do not need our sign-off to fix the bug. If you want to pursue C, please open it as its own discussion with independent justification (is the kind-switch inderiveToolResultStatusa recurring defect source, and what does it cost to maintain), evaluated on its own merits.testikun commentedon Sep 17, 2026
Agreed, @Astro-Han. I'll proceed with option B for this issue:
success/error/abortedthrough the Desktop capability result and Host settlement, preserving the outcome separately from model-facing content.The full
ToolResultmigration and plugin API redesign are out of scope for this fix. Our investigation supports the result-loss defect, but does not yet establish that a full migration is the best way to reduce maintenance cost. Any further proposal for C will be a separate discussion with its own evidence and comparison against smaller alternatives.I'll keep the implementation scoped to this result path and its necessary compatibility/tests; the bug fix will not wait for an architectural sign-off.