desktop: investigate session closing during tab selection and missing-worktree archive recovery

Open
#9,224 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
18/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
javascript, macos, node.js
Domain
desktop-dev

Research direction

This is an unproven root cause, so start by reading the close-confirmation work in #5206/#5212 and the archive resume path in #8866 to learn where a session close is initiated and where the worktree directory is checked before Resume/Continue are enabled. Then build a disposable-worktree harness that captures the accessibility action target, the effective confirmation preference, and close-request provenance, as the steps section asks. Done means a deterministic repro (or a ruled-out mechanism) plus regression coverage for tab selection vs. close targeting and archive recovery.

Written by the indexing model from the issue text.

Description

bug

What happened?

During macOS desktop dogfooding, a live isolated Claude session closed immediately after an accessibility-driven click intended to select its session tab. The live tab disappeared and a notification changed to No longer open. No close confirmation dialog was observed or dismissed, and no deliberate close was requested.

The archive preserved the transcript, but Resume and Continue were disabled because the session's working directory no longer existed. This interrupted the investigation and required a replacement session.

Root cause is not established. An unintended hit on a nested close control is a hypothesis, not a proven mechanism. The effective close-confirmation setting, native accessibility hit routing, and server-side close initiator still need investigation. This report does not claim source-code loss: no source edits were recorded in the observed transcript before closure.

Steps to reproduce

Observed sequence, not yet a deterministic reproduction:

  1. Create a Claude session with worktree isolation in the macOS desktop app and begin an investigation.
  2. While that session has a pending permission request, inspect a fresh accessibility tree and click the element identified as its session tab, intending to select it. The tab was reported active with one attention item.
  3. Observe the tab disappear from the live roster and the notification change to No longer open. No confirmation dialog was observed.
  4. Refresh Control Room's archive. The closed session appears with its transcript preserved; Resume and Continue are disabled with a missing-directory explanation.

Do not reproduce on valuable live sessions. Use disposable worktrees and capture the action target, effective confirmation preference, close-request provenance, and worktree lifecycle.

Expected behavior

Selecting a session tab must not terminate it. If a close action is actually invoked, the configured confirmation behavior must be honored and the destructive worktree consequences made clear. An archived transcript should have a safe, explicit recovery route when its managed worktree is gone, or explain the supported recovery steps without implying that the transcript itself was lost.

Investigate with regression coverage for native/accessibility tab selection versus close targeting, pending-permission close behavior, and isolated-worktree archive recovery. Preserve approval boundaries: recovery must not silently approve pending actions or restore unproven authority.

Environment

  • OS: macOS 27.2.1
  • Node version (available Node 22 installation; process version not independently checked): v22.23.2
  • Chroxy version: installed desktop bundle previously reported 0.11.9; daemon health previously reported 0.11.10 at checkout fea32586. This is the observed deployment split, not proof of which frontend artifact handled the click.
  • Surface: native macOS desktop app, accessibility-driven interaction, isolated Claude session

Logs

Redacted observation summary, not a verbatim server log:

2026-11-18 08:29:43 UTC: session closed after attempted tab selection
Live roster: session removed
Notification: No longer open
Archive: 23/23 transcript entries retained
Resume / Continue: disabled; directory this session ran in no longer exists

No credentials, private transcript content, session identifiers, or local user paths are included.

Related issues and scope
  • #9222 covers stale Allow/Deny buttons after retirement and explicitly excludes native close-confirmation behavior. This issue tracks the close/recovery incident, not that banner fix.
  • #5206 / #5212 implemented default-on close confirmation; verify the effective preference and path before calling this a regression.
  • #8866 covers archive resume/continue, and #6866 is the broader archive epic.
  • #8856 covered a live session's agent deleting its own worktree before restore. This incident instead followed session closure; no agent-initiated worktree deletion was observed.
Dominant language
JavaScript
Stars
7
Forks
1
Avg merge
2h 3m
Merged PRs (30d)
333

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from blamechris/chroxy

All issues in blamechris/chroxy

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.