Skip to content

🤖 feat: share caller desktops with delegated desktop agents - #4081

Queued
ThomasK33 wants to merge 27 commits into
mainfrom
share-desktop-delegation
Queued

🤖 feat: share caller desktops with delegated desktop agents#4081
ThomasK33 wants to merge 27 commits into
mainfrom
share-desktop-delegation

Conversation

@ThomasK33

@ThomasK33 ThomasK33 commented Sep 4, 2026

Copy link
Copy Markdown
Member

Summary

Delegating to a desktop specialist now changes the operator, not the computer. New desktop agents share the caller's effective desktop by default; desktop: "isolated" opts into a separate desktop independently of checkout isolation. Other agents and legacy saved children retain isolated behavior unless explicitly bound.

Implementation

  • Persist and validate an ancestor-owned desktop binding, routing tools and requester-scoped viewer tokens to the same owner session. Child cleanup never closes its borrowed desktop. Established and pending borrower viewer connections are revoked immediately during archive/removal while owner and unrelated viewers remain connected.
  • Serialize desktop input with task admission using process-local and transient cross-process owner gates and existing task/execution statuses; revalidate active admissions inside the cross-process config transaction. Reject competing/shared grouped launches, preserve queued and reawakened bindings, and protect newer continuations from stale callbacks.
  • Watch persisted workspace changes while viewers are connected so archive/removal by another backend revokes idle and pending bridges too. Clear orphaned execution mirrors during startup without clearing the separate task activity status.
  • Return control on initial, reawakened, and restart-recovered UI Stop paths; await timed-out input process termination before handoff.
  • Show the shared owner in the viewer, document the default and scope limits, and cover desktop/phone layouts.
  • Remove an obsolete, unused Config.getSessionDir mock in an existing pin-order fixture so the local typecheck gate can run.
  • Make existing terminal-recovery fault injections lazy so asynchronous disk scanning does not leave an eagerly rejected test Promise unhandled; production recovery is unchanged.

Validation

  • Current head 633c64a78: make static-check and 678 combined desktop/bridge/task/recovery/viewer tests passed. New regressions cover competing admissions from two backend instances, external archive/removal over real Node-hosted WebSocket/TCP bridges, and orphan-mirror recovery. The owner gate additionally passed 420 stress cases, including input held open against a second backend's admission. Earlier merge integration also passed make static-check-full and 3,000 monitor-test stress repetitions.
  • 109 desktop/session/bridge/tool/viewer tests and 35 targeted task lifecycle regressions passed; config round trips and both full-app desktop Storybook plays passed. Follow-up review fixes passed the combined 494-test desktop/workspace suites, all 117 turn-manager tests, and the 55-test viewer/sidebar suite with shared DOM preloading.
  • Real PortableDesktop sandbox: shared state with both checkout-isolation modes, explicit isolated desktop, busy-input rejection with screenshots still available, stop/reawakening, child removal preserving the parent, phone layout, and graceful restart recovery.
  • Live testing found UI Stop control retention; deterministic initial/reawakened/queued-successor regressions and a real GUI retest now cover the fix. A SIGTERM-resistant command regression also proved timed-out input is dead before another controller can act.

Scope and risks

The original process-local gate was extended during review with the existing transient process-lock primitive: global handoff must wait for input running in another backend. Locks are released after each operation; config remains the only controller ledger.

This coordinates Mux desktop-tool input, not human noVNC input, shell commands, or external CDP clients. Desktop-process/browser-state persistence across backend restarts is not promised. No retargeting/migration of legacy children, profile copying, lease service, or changes to checkout-isolation semantics.

Dogfood evidence

Shared child and parent operate the same browser state:

Shared child viewer with existing parent browser state

Parent remains usable after recovery and child UI Stop:

Parent desktop control restored after restart and child UI Stop

Shared/isolated comparison walkthrough:

review-walkthrough.webm

Reawakened UI Stop followed by restored parent control (two sequential short clips):

ui-stop-review.webm

📋 Implementation Plan

Share the current desktop with delegated desktop agents

Goal and recommendation

Delegating computer use should change who operates the computer, not which computer is operated. Newly created desktop specialists should use the caller’s existing desktop by default; independent GUI testing should request an isolated desktop explicitly.

Implement one shared desktop-target resolver and a short-lived input gate, using existing task status as the source of control ownership. Keep repository isolation independent. Estimated net product-code change: +400–650 LoC, excluding tests, stories, agent instructions, and documentation. No new lease daemon, heartbeat, or PortableDesktop fork is needed.

Verified starting point

Investigation used clean HEAD 2a1b5b267c0133f3d89d023a55d1c2b725d70386.

  • taskService.ts creates a distinct child workspace ID even with isolation: "none"; that flag shares only the checkout.
  • desktopTools.ts passes the caller’s workspace ID to DesktopSessionManager, which keys sessions/startup promises by that ID. PortableDesktopSession creates a separate state file and virtual display for each session.
  • The child viewer independently follows DesktopPaneluseDesktopConnectiondesktop.getBootstrap. Tool-only redirection would leave the viewer wrong.
  • close(workspaceId) participates in archive/removal cleanup. Aliasing it to the parent would destroy the borrowed desktop.
  • Task creation already has a task-tree lifecycle lock. Initial executions use taskStatus; reawakened executions also use taskExecutionId and taskExecutionStatus through WorkspaceTurnManager.
  • noVNC currently accepts human input directly. Bash/CDP are separate control paths; neither inherits a desktop target automatically.
  • Existing desktop unit suites passed during investigation: 46 tests. They use a PortableDesktop process shim, not real GUI validation.

Behavior contract

Case Desktop target
New task(agentId: "desktop") Caller’s effective desktop
task(..., desktop: "shared") Caller’s effective desktop, including for a custom agent
task(..., desktop: "isolated") Child’s own desktop
Other agents without a desktop option Existing isolated behavior
Previously saved children without target metadata Existing isolated behavior; no silent retargeting
  • Add desktop: z.enum(["shared", "isolated"]).nullish() for sub-agent tasks. Reject this option on full kind: "workspace" launches rather than ignoring it.
  • Built-in-ID desktop supplies the default; do not infer it from the presence of individual tools or broaden agent-inheritance machinery. Custom agents opt in explicitly.
  • Persist an optional taskDesktopOwnerWorkspaceId on shared children. Absence means self-owned/isolated, avoiding redundant mode state. Store the flattened actual owner, derived server-side from the caller—not a model-supplied workspace ID.
  • Bind queued and immediately started children identically. Reawakening preserves the binding; it never silently falls back to a fresh desktop when the owner is missing.
  • isolation: "fork" and isolation: "none" retain their current filesystem meanings in either desktop mode.
  • Reject n > 1 with shared targeting before creating any child. Parallel GUI work must explicitly use isolated desktops.
  • One active shared child controls agent input per desktop. Competing shared children, including nested handoffs onto an already-controlled desktop, are rejected; no new queueing/recursive handoff protocol.

Phase 1 — Target identity, routing, and lifetime

Estimated net product code: +150–230 LoC.

  1. Extend the task schema/dispatch in src/common/utils/tools/toolDefinitions.ts and src/node/services/tools/task.ts; thread the option into TaskService.create.
  2. Add the persisted field in src/common/schemas/project.ts and necessary workspace type/metadata mappings. Preserve it through config reads/writes, queued materialization, and reawakening. Keep legacy entries unmodified.
  3. Put resolution in the desktop subsystem, not in each tool or ToolConfiguration. Use current persisted metadata to validate requester, owner, and ancestor relationship; reject missing/archived owners, cycles, unrelated targets, and unsupported runtimes without provisioning a fallback session. Treat invalid persisted data as an operation error, not a startup crash.
  4. Make capability, session startup, screenshot/action, and bootstrap use that resolver. Reuse the owner’s existing session and startup single-flight. Preserve the caller’s identity in history, tool artifacts, and task attribution.
  5. Keep has/close owner-keyed. Closing/removing a shared child must never close the owner’s session. Recheck requester and owner lifecycle state across asynchronous startup/admission, retaining existing archive-vs-startup protection.
  6. Update desktopOperations.ts, DesktopTokenManager.ts/DesktopBridgeServer.ts only as necessary: retain requester identity in bootstrap tokens, bind them to the resolved session, and validate the current requester→owner relationship at connection time. Do not let a stored owner ID become arbitrary cross-workspace authority.

Gate: regression tests prove one PortableDesktop startup for parent + shared child, correct child viewer targeting, explicit isolation, legacy stability, and owner-only teardown. Do not proceed with tool-only sharing.

Phase 2 — Safe agent-input handoff

Estimated net product code: +210–350 LoC.

Add a small DesktopInputCoordinator in src/node/services/desktop/, shared by task admission and DesktopSessionManager.action. It needs only config and per-owner scoped mutexes—not a second task lifecycle state machine. Provide it early in DI (src/node/services/di/layers/core.ts / desktop.ts) to WorkspaceService, TaskService, WorkspaceTurnManager, and DesktopSessionManager; do not introduce a dependency from task creation back into the manager’s WorkspaceService dependency.

  • Source of truth: a shared child reserves input while either taskStatus is queued/starting/running/awaiting_report or taskExecutionStatus is queued/starting/running. A terminal old execution mirror must not mask an active direct-message turn. Reuse existing status predicates where appropriate and test this combination explicitly. Multiple apparent controllers fail closed.
  • Admission: take the owner input gate, re-read state, check for another controller, and persist active state before dispatching the prompt. Use existing task-tree locking for task creation/reawakening and the same input gate for direct sends. Cover both initial create persistence branches and queued materialization in TaskService, active mirrors in WorkspaceTurnManager.updateAgentTaskExecutionState, direct child WorkspaceService.sendMessage transitions, and TaskService.recoverInterruptedTasks. Retrying an already-reserved child is idempotent, not a self-conflict. Release the gate before nested service calls such as sendMessage that also use admission; never recursively acquire it.
  • Actions: take the same owner gate, revalidate target/controller state, and hold it through completion of the actual input command. The active controller may act; the owner may act only when no shared child is active. Inactive borrowers must reactivate before sending input. Move, click, drag, scroll, type, and key presses all count as input.
  • Reads: screenshots and viewers remain available to parent and child throughout delegation.
  • Lock order: task-tree/lifecycle lock → owner input gate → config mutation. Never hold a config write lock while waiting for the input gate; input execution must not acquire the task-tree lock. Account for existing TaskService mutex ordering at the wiring seam.
  • Release: use existing terminal/interrupted/rollback/recovery transitions. Do not release control merely because the parent’s foreground wait timed out or was cancelled: the child may still be running in the background.
  • Generation safety: preserve the existing exact-handle guards for terminal/clear writes in updateAgentTaskExecutionState. Its active-state branch currently replaces the mirror, so admission must also reject superseded handles rather than reviving them. Test stale active updates and stale terminal callbacks against a newer continuation; an old in-flight input must finish before another controller can begin.
  • Restart: recoverInterruptedTasks can resume/requeue tasks, not merely mark them interrupted. Reconcile reservations before admitting input: a resumed child retains control, a terminal child releases it, and malformed competing reservations fail closed with an actionable stop/recovery path. No silent desktop recreation when the owner is gone.
  • No sleeps, lease TTLs, polling cleanup, or persistent lock files. Shared control returns automatically after task settlement, while browser state survives within the running desktop session.

Gate: deterministic concurrency tests hold an input command open while admission races it. Prove no overlap, no partial grouped launch, correct reawakening/stop behavior, and no deadlock or permanent lockout after failure/restart recovery.

Phase 3 — Make the target visible

Estimated net product code: +40–70 LoC.

  • Expose the resolved target in existing task results and desktop bootstrap metadata; retain current caller attribution.
  • In DesktopPanel.tsx/useDesktopConnection.ts, connect through the caller’s bootstrap and show a compact “Shared desktop · ” label when applicable. Both workspace viewers must show the same live desktop. Reuse existing UI patterns; no new settings page or controls.
  • Update src/node/builtinAgents/desktop.md and task parameter guidance: operate the bound desktop; explicitly request isolation for independent tests; perform dependent screenshot/action steps sequentially; report which desktop changed. Direct tools remain valid for small actions in the parent.
  • Document the separation from checkout isolation and the scope limit: exclusion coordinates Mux desktop tools, not human noVNC input, shell-launched tools, or external CDP clients. Do not advertise this as a security lock. Keep existing human viewer behavior; no VNC protocol interception or takeover UI in this change.

Gate: add/update a full-app desktop story and UI coverage for the shared label and correct viewer target. Check desktop and ~375–390 px widths, with a pinned Pixel viewport where needed. No overflow or misleading isolated child screen.

Acceptance criteria and automated validation

  • Default desktop delegation preserves the parent’s open windows/tabs and acts on that same session for both checkout-isolation choices.
  • Explicit isolated children and unrelated workspaces cannot affect the parent through desktop tools; legacy saved children remain isolated.
  • Shared bootstrap/viewer and tools identify the same owner; missing/archived/unrelated targets fail clearly without creating replacement desktops.
  • Only one agent controller can send input; parent screenshots still work. Concurrent admissions and parent actions cannot interleave.
  • Stop, error, failed launch, reawakening, stale completion, and startup recovery leave control correct. A foreground wait timeout alone does not release it.
  • Child completion/archive/removal preserves the owner’s session; owner cleanup closes it and blocks child restart attempts.
  • Grouped shared launch fails before side effects; shared-target results/labels are accurate.

Extend behavior-based tests in:

  • src/node/services/desktop/DesktopSessionManager.test.ts, DesktopTokenManager.test.ts, and DesktopBridgeServer.test.ts; colocate pure resolver/input-coordinator tests if extracted.
  • src/node/services/tools/desktopTools.test.ts and task tool tests.
  • src/node/services/taskService.test.ts, workspaceTurnManager.test.ts, and targeted desktop cleanup cases in workspaceService.test.ts.
  • Full-app UI/Storybook coverage for the target label. Do not test prompt sentences or static copy as correctness proofs.

Run focused tests after each phase, then a final pass after all edits:

bun test src/node/services/desktop/ src/node/services/tools/desktopTools.test.ts
bun test src/node/services/taskService.test.ts src/node/services/workspaceTurnManager.test.ts
bun test src/node/services/workspaceService.test.ts -t desktop
make static-check

Also run the added task-tool/UI tests and relevant Storybook interaction test using the repo’s harness. Report unrelated baseline failures separately; do not call validation successful if required gates are blocked.

Dedicated dogfooding and evidence

Use a separate sandbox, never the currently running Xum instance or another worktree.

  1. Start make dev-server-sandbox DEV_SERVER_SANDBOX_ARGS="--clean-projects" as a bounded background task; use its fresh XUM_ROOT and printed free ports. Add a disposable local project and enable portable-desktop. Keep provider credentials private. Confirm the real PortableDesktop binary is available; a shim test is not a substitute.
  2. Load agent-browser’s current core/recording instructions, connect to the sandbox app, and begin a video recording. Open the parent Desktop viewer and establish recognizable browser state (coder.com plus a harmless local test page with an editable field).
  3. Delegate to desktop without a desktop option. Have it modify the local test page. Capture parent-before, child-during, parent-after screenshots, and show both viewers displaying the same state. Repeat with the other checkout-isolation choice.
  4. Launch an explicitly isolated desktop child and visibly demonstrate that its actions do not alter the parent. Attempt a competing shared child and parent input while the shared child is active; capture clear busy errors and continued screenshot access.
  5. Stop the shared child, verify direct parent input works, reawaken it and verify the same target, then remove/archive the child and prove the parent browser survives. Exercise a failed/interrupted run. Test restart recovery for correct control ownership (resumed child retains it; settled child releases it); desktop-process persistence across app restarts is not promised.
  6. Verify the new label at desktop and mobile widths. Save the recording and screenshots under $HOME/.cache/xum-dogfood/general-9bks/, attach them with a short reproduction log, and record the validated revision. Evidence must show the parent screen, not only the child’s self-report.
  7. Stop sandbox processes/recorders and dispose only sandbox-owned sessions after evidence is saved. If GUI/media capture is unavailable, report that gate as blocked rather than replacing it with a text-only success claim.

No PR is requested. If GitHub publication is later authorized, upload screenshots/video with native gh ... --attach and include the implementation plan.

Deliberate exclusions

No workspace-wide sharing default, automatic merging of desktop state, live retargeting of old children, browser-profile copying, shell/CDP environment changes, new lease service, or broad task lifecycle refactor. The changes share an existing desktop session; they do not merge agent reasoning history or turn separate desktops into one.


Generated with xum • Model: coder:openai/gpt-6-astra • Thinking: high • Cost: $336.29

Task schema and persistence tests pass; desktop coordinator and lifecycle implementations follow in scoped integration commits.

---
_Generated with [`mux`](https://github.com/coder/mux) • Model: `coder:openai/gpt-6-astra` • Thinking: `high`_
Resolve persisted desktop owners from current ancestry and serialize durable
admission with input. Keep sessions owner-keyed and tokens requester-bound.

Validation: 49 desktop tests and touched-file formatting pass. Typecheck and
typed lint await the parent-owned taskDesktopOwnerWorkspaceId schema;
typecheck also exposes the existing workspaceService.test.ts Config stub error.
Acquire distinct owner gates in sorted order and validate the full batch
before its durable admission callback. Reject conflicting borrowers within
one batch and delegate singleton reservations to the same path.

Validation with parent schema dependencies: 51 desktop tests, touched-file
ESLint/formatting, and main TypeScript config pass. Full project typecheck
has only the existing workspaceService.test.ts Config stub error.
Keep shared-target metadata tied to the caller bootstrap, clear it on connection teardown, and remount viewers on workspace switches. Add full-app responsive stories, binding lifecycle tests, and bound-desktop agent guidance.
Regenerate bundled task and agent guidance. Focused desktop lifecycle tests, lint, formatting and main-process typecheck pass. Full typecheck remains blocked by the existing getSessionDir Config test fixture.

---
_Generated with [`mux`](https://github.com/coder/mux) • Model: `coder:openai/gpt-6-astra` • Thinking: `high`_
Replace the action/screenshot timeout race with execFileAsync process-tree
termination and its close-backed result. A SIGTERM-resistant input command
can no longer outlive action completion and the desktop input gate.

The deterministic regression failed with a live PID after action completion
before the fix and passes after it. All 52 desktop tests, scoped lint and
formatting, and main typecheck pass with parent schema dependencies applied.
The fixture already uses a real HistoryService and never reads this removed method. Remove the stale stub to restore the local typecheck gate.

---
_Generated with [`mux`](https://github.com/coder/mux) • Model: `coder:openai/gpt-6-astra` • Thinking: `high`_
@mintlify

mintlify Bot commented Sep 4, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
Mux 🟢 Ready View Preview Sep 4, 2026, 12:43 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

@chatgpt-codex-connector

This comment has been minimized.

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review


Generated with mux • Model: coder:openai/gpt-6-astra • Thinking: high

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex security review


Generated with mux • Model: coder:openai/gpt-6-astra • Thinking: high

@chatgpt-codex-connector

This comment has been minimized.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

ws.taskStatus = "running";

P1 Badge Restore the stable status after a reported child continuation

When a reported shared-desktop child is reawakened through task_send_message, this branch changes its stable taskStatus from reported to running, even though the workspace-turn execution mirror already reserves the desktop. Normal workspace-turn settlement only transitions taskExecutionStatus to a terminal state; it does not restore taskStatus. Consequently DesktopInputCoordinator.isActive() continues treating the child as the active borrower after the continuation completes, permanently blocking owner input and subsequent shared children until an explicit stop or restart. Preserve reported for correlated workspace turns or restore it when that execution settles.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/node/services/desktop/DesktopInputCoordinator.ts
Comment thread src/node/services/desktop/DesktopBridgeServer.ts
@chatgpt-codex-connector

This comment has been minimized.

@chatgpt-codex-connector

This comment has been minimized.

Avoid eager rejected Promises escaping before asynchronous record scanning reaches the mocked recovery calls. Both per-record recovery tests now exercise the existing production catches and pass without changing recovery behavior.

---
_Generated with [`mux`](https://github.com/coder/mux) • Model: `coder:openai/gpt-6-astra` • Thinking: `high`_
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

Latest head: 931d3ff175fd00ebc724fc3d55a27eb29211deac. Local static checks and the full WorkspaceTurnManager suite pass. Please review the current head; the previous code-review request returned an infrastructure error rather than a verdict.


Generated with mux • Model: coder:openai/gpt-6-astra • Thinking: high

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex security review

Please review current head 931d3ff175fd00ebc724fc3d55a27eb29211deac.


Generated with mux • Model: coder:openai/gpt-6-astra • Thinking: high

@chatgpt-codex-connector

This comment has been minimized.

@chatgpt-codex-connector

This comment has been minimized.

@chatgpt-codex-connector

This comment has been minimized.

@chatgpt-codex-connector

This comment has been minimized.

@chatgpt-codex-connector

This comment has been minimized.

Pixel can prepend non-layout nodes to its story canvas, so firstElementChild is not necessarily the 390px wrapper. Keep the responsive width and overflow assertions but select the actual frame. Both desktop story plays pass locally; static-check is green.

---
_Generated with [`mux`](https://github.com/coder/mux) • Model: `coder:openai/gpt-6-astra` • Thinking: `high`_
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

Please review current head 2f9121f1db1eca0f002a46d8265dd56e2d146305. The only change since the prior reviewed head is the phone-story canvas selector correction; both desktop story plays and local static checks pass. Both lifecycle review threads remain resolved.


Generated with mux • Model: coder:openai/gpt-6-astra • Thinking: high

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex security review

Please review current head 2f9121f1db1eca0f002a46d8265dd56e2d146305.


Generated with mux • Model: coder:openai/gpt-6-astra • Thinking: high

@chatgpt-codex-connector

This comment has been minimized.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: 2f9121f1db

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ThomasK33
ThomasK33 added this pull request to the merge queue Sep 4, 2026
Any commits made after this event will not be merged.
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 4, 2026
Resolve duplicate sidebar fixture keys introduced by the merge with main. Dispose the monitor reconciler before removing each test session so accepted wakes cannot leak into the next test’s fixtures.

Validation: static-check and static-check-full passed; 752 desktop/lifecycle tests and 8 workspace desktop tests passed. The reproduced monitor failure passed 3,000 stress tests on CI Bun 1.3.5 after teardown cleanup.

---

_Generated with `xum` • Model: `coder:openai/gpt-6-astra` • Thinking: `high` • Cost: `$298.06`_

<!-- mux-attribution: model=coder:openai/gpt-6-astra thinking=high costs=298.06 -->
Bring in the startup lifecycle change that landed while validating the prior merge. The combined branch passes make static-check and all 84 startup/desktop tests.

---

_Generated with `xum` • Model: `coder:openai/gpt-6-astra` • Thinking: `high` • Cost: `$298.06`_

<!-- mux-attribution: model=coder:openai/gpt-6-astra thinking=high costs=298.06 -->
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

Please review current head 66f454eeb2a4e7500cea66168a161864c74bd502. Main has been integrated; the merge-group duplicate fixtures and reproduced monitor-test teardown leak are fixed. Local static/full-static and focused regression gates passed.


Generated with xum • Model: coder:openai/gpt-6-astra • Thinking: high • Cost: $298.06

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex security review

Please review current head 66f454eeb2a4e7500cea66168a161864c74bd502. Main has been integrated; the merge-group duplicate fixtures and reproduced monitor-test teardown leak are fixed. Local static/full-static and focused regression gates passed.


Generated with xum • Model: coder:openai/gpt-6-astra • Thinking: high • Cost: $298.06

@chatgpt-codex-connector

This comment has been minimized.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 66f454eeb2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/node/services/desktop/DesktopBridgeServer.ts
Comment thread src/node/services/desktop/DesktopInputCoordinator.ts
Comment thread src/node/services/desktop/DesktopInputCoordinator.ts
Revalidate task creation, reactivation, and plan handoff against the locked config snapshot so independent backends cannot persist competing desktop borrowers. Keep process-local input gates and use the existing cross-process config lock.

Validation: deterministic two-backend task creation reproduced two successful reservations before the fix and one afterward; 600 task, execution, and coordinator tests passed; make static-check passed.

---

_Generated with `xum` • Model: `coder:openai/gpt-6-astra` • Thinking: `high` • Cost: `$308.58`_

<!-- mux-attribution: model=coder:openai/gpt-6-astra thinking=high costs=308.58 -->
Watch the config parent directory while viewers are pending or connected,
revalidate their persisted requester/owner and session bindings on changes,
and fail closed if watching fails. Retain immediate local revocation and
close the validation-to-watch-install race before starting TCP connection.

Real cross-backend filesystem tests run the backend under Node, matching
production, to avoid Bun idle fs.watch event-loss artifacts. All 72 desktop
tests, scoped lint/format checks and both TypeScript configurations pass.
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

Please review current head cb334a24011328e33e94b709c045d96f229a4970. All three findings from review 5114546018 are fixed, replied to, and resolved. Combined 676-test regression run and make static-check passed.


Generated with xum • Model: coder:openai/gpt-6-astra • Thinking: high • Cost: $308.58

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex security review

Please review current head cb334a24011328e33e94b709c045d96f229a4970. All three findings from review 5114546018 are fixed, replied to, and resolved. Combined 676-test regression run and make static-check passed.


Generated with xum • Model: coder:openai/gpt-6-astra • Thinking: high • Cost: $308.58

@chatgpt-codex-connector

This comment has been minimized.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cb334a2401

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/node/services/desktop/DesktopSessionManager.ts
@chatgpt-codex-connector

This comment has been minimized.

@chatgpt-codex-connector

This comment has been minimized.

Extend the owner gate with the existing transient process-file-lock primitive so another backend cannot admit a new controller before an in-flight input finishes. Keep config as the ownership ledger and retain sorted multi-owner acquisition, automatic release, and unlocked screenshots/viewers.

Validation: both cross-backend input/admission regressions failed before the change and pass afterward; 678 combined regressions, 420 coordinator stress cases, make static-check, and independent review passed.

---

_Generated with `xum` • Model: `coder:openai/gpt-6-astra` • Thinking: `high` • Cost: `$336.29`_

<!-- mux-attribution: model=coder:openai/gpt-6-astra thinking=high costs=336.29 -->
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

Please review final head 633c64a78cdc7e2e4775a839b342ef4ad1736e32. The cross-backend in-flight input/admission finding is fixed and resolved. Validation: 678 combined tests, 420 gate stress cases, make static-check, and independent review passed.


Generated with xum • Model: coder:openai/gpt-6-astra • Thinking: high • Cost: $336.29

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex security review

Please review final head 633c64a78cdc7e2e4775a839b342ef4ad1736e32. The cross-backend in-flight input/admission finding is fixed and resolved. Validation: 678 combined tests, 420 gate stress cases, make static-check, and independent review passed.


Generated with xum • Model: coder:openai/gpt-6-astra • Thinking: high • Cost: $336.29

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: 633c64a78c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

This comment has been minimized.

@ThomasK33
ThomasK33 added this pull request to the merge queue Sep 4, 2026
Any commits made after this event will not be merged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant