Skip to content

bug(codex): computer use session does not terminate #6730

Open

Description

@sms-yui

Summary

A user reports that a Codex Computer Use session in bb does not terminate. Expected behavior is for Computer Use to release control and end its active session when the corresponding work is stopped or finished.

Not independently reproduced. The original report does not specify whether this happens after normal completion, Stop, or thread closure, or whether the lingering state is the Computer Use UI, a process, or the bb turn. Those distinctions still need to be captured; no root cause is established.

Versions and environment

Verified on the reporting machine on 2026-10-30:

  • Installed macOS desktop app: bb 0.48.0; bb --version also returns 0.48.0.
  • macOS 26.5.2 (25F84), arm64.
  • Provider: Codex; local codex --version: codex-cli 0.166.0.
  • Local Mac execution host with a remote bb server.

These are the reporting environment's current versions, not a verified identification of the failing session's build. The affected thread ID, precise failure time, and original session's CLI build are not yet identified.

Steps to reproduce

Suggested diagnostic recipe, not a confirmed reproduction:

  1. Start a Codex thread in bb on macOS with Computer Use available.
  2. Ask it to inspect an app with Computer Use and then finish.
  3. Observe whether the active Computer Use session releases control after completion.
  4. In a separate attempt, stop the turn while Computer Use is active and observe whether the active session ends.

Capture the affected thread ID, the exact termination action, and which state remains active. Normal completion and explicit Stop should be checked separately; idle provider-process reuse alone does not establish this defect.

Expected vs actual

Expected: Computer Use ends its active session and releases control after the relevant termination action.

Actual, as reported verbatim:

codex computer use session doesnt terminate

No failing trace or screenshot has been captured, and no session was interrupted as part of filing this report.

Evidence

  • Reporting conversation: bb thread thr_bxjcitc958, project proj_5vda5bh2f5 (private instance; reference as @thread:thr_bxjcitc958 inside bb). This is the reporting thread, not an identified failing session.
  • Versions were read from the installed app's Info.plist, bb --version, codex --version, sw_vers, and uname -m.
  • A local process snapshot shows Codex and Computer Use-related processes, but they cannot be attributed to the reported failure. Their presence is not evidence of failed cleanup.

What you ruled out

AGENT GENERATED

Activity

  1. added theissue type on Oct 30, 2026
  2. added
    providers
    provider-codex
    no-repro
    on Oct 30, 2026
  3. bb-slop-cop commented on Oct 30, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    • Classification: Bug · Priority Medium · Effort Medium; applied providers, provider-codex.
    • Reproduction report: NOT REPRODUCED · root-cause confidence low · applied no-repro.
    • Evidence: Two clean trusted-main checkouts each pass 45 existing lifecycle tests and 47 tests with two added Computer Use cancellation probes. Native macOS control release was not exercised; these fixture-level checks do not rule out the report.
    • Root cause: Not established. Tested bridge cancellation, interrupt/release and child shutdown paths pass. Next evidence needed: an attributable failing turn, the exact termination action and the native state that remains active.
    • No PR: The native defect is not reproduced, so no failing regression supports a safe fix.
  4. smsunarto commented on Nov 4, 2026

    @smsunarto
    Contributor

    Follow-up investigation: cleanup notification blocked by macOS

    The user reports that the Computer Use cursor remains after Codex stops using it in BB, while Codex Desktop clears it. Host logs now establish a failed turn-end cleanup path. Cursor disappearance has not been independently recorded, and I did not reproduce this on latest main.

    Versions and environment

    BB 0.48.1, macOS 26.5.2 (25F84), arm64, Codex CLI 0.166.0, Node v24.22.2. The affected host daemon is a launchd service running a dedicated Node copy installed by personal dotfiles, connected to a remote BB server. It is independent of the desktop app.

    Evidence

    On 2026-11-03, TCC rejected three cleanup attempts. In each case, the responsible process was the launchd Node daemon, and the accessing process was OpenAI's signed SkyComputerUseClient. The helper subsequently logged a transport failure for the corresponding turn.

    Trimmed log excerpts, with the home directory and identifiers redacted:

    2026-11-03 19:50:21.863 tccd: Prompting policy for hardened runtime; service: kTCCServiceAppleEvents requires entitlement com.apple.security.automation.apple-events but it is missing for responsible={identifier=node, pid=17134, responsible_path=<home>/.local/share/bb-node/bin/node}, accessing={identifier=com.openai.sky.CUAService.cli, pid=53730}
    2026-11-03 19:50:27.129 SkyComputerUseClient[53730]: Error Domain=ComputerUseClient.ComputerUseIPCXPCTransport.Error Code=2
    

    Inspection with codesign -d --entitlements - <node-path> confirmed that this hardened Node executable lacks the Automation entitlement. The installed Codex Desktop executable has it. Codex's existing notify configuration does invoke SkyComputerUseClient turn-ended; cleanup is attempted rather than omitted.

    The source also explains the scope: the machine installer selects caller-provided Node and launches that executable directly. Desktop signing cannot change this daemon's permissions.

    Related fix and remaining work

    #7000 addresses the desktop-app entitlement issue tracked by #2368, adds the permission usage description, and keeps Electron helper permissions unchanged. Its packaging regressions failed before the patch and all 25 focused packaging tests pass afterward, at f83c11338f762fbe19b45012ee9db15b83db2b84. A signed packaged build and actual completion/interruption/reuse behavior remain unverified.

    This issue should remain open: #7000 does not repair the independently enrolled Node runtime. Its runtime signing/launch path needs a separate fix and verification that cleanup succeeds and the cursor clears after completion and interruption.

    For a faithful reproduction, start a Codex thread on such an enrolled macOS host, ask it to inspect Calculator with Computer Use and finish, then correlate the remaining cursor with log show --last 10m --style compact --predicate 'process == "tccd" OR process == "SkyComputerUseClient"'. This recipe is diagnostic, not an independently verified end-to-end reproduction.

    Investigation: BB thread thr_rhj64f5cwa (private instance). No live daemon was restarted or re-signed.

    AGENT GENERATED

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    no-reproprovider-codexproviders

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions