[BUG] EnterWorktree approval dialog in a --bg session is not relayed to Remote Control, session hangs silently

Status Open
Reported on v2.1.281
Maintainer reply None cached
Activity 0 comments · opened Sep 23, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

A background session started with claude --bg ... --remote-control <name> hit the EnterWorktree approval dialog for a worktree outside .claude/worktrees/. That dialog was rendered only in the session's local TUI (visible through claude logs <id>). It was never surfaced through Remote Control: not in the Claude desktop app, not in the mobile app, and not through the session's channel integration.

The session was still listed as connected via Remote Control and showed waiting in claude agents, but there was no way to answer the dialog remotely. It sat blocked for about 30 minutes until someone noticed and attached from a terminal.

For a --bg session, the local TUI is the one place nobody is looking, so any dialog that is only rendered there turns into a silent hang.

Related but different: #94265 and #77069 are about how often this approval is required. This report is about where the dialog is delivered.

What Should Happen?

Either:

  • the dialog is relayed to Remote Control clients (desktop/mobile) like other permission requests, so it can be approved remotely; or
  • when no interactive surface can answer it (a --bg session), the tool call fails fast with a clear error the model can act on (for example "EnterWorktree outside .claude/worktrees requires interactive approval"), instead of blocking indefinitely.

Error Messages/Logs

Tool use
Entering worktree(<repo>/projects/<app>/.claude/worktrees/<name>)
Creates an isolated worktree (via git or configured hooks) and switches the session into it
permission-root relocation to "<repo>/projects/<app>/.claude/worktrees/<name>" — a model-supplied worktree outside .claude/worktrees/
Do you want to proceed?
❯ 1. Yes
  2. No
Esc to cancel · Tab to amend

(from claude logs <id>; the Remote Control apps showed nothing to approve)

Steps to Reproduce

  1. In a git repo A that contains a nested, independent git repo A/projects/B, create a worktree of B at A/projects/B/.claude/worktrees/w (plain git worktree add).
  2. From A, launch a background session with Remote Control:

claude --bg --worktree x --name x --remote-control x --permission-mode auto 'Enter the worktree at A/projects/B/.claude/worktrees/w with EnterWorktree and list its files'

  1. Open the session x in the Claude desktop or mobile app via Remote Control.
  2. Observe: the app shows nothing to approve. claude agents shows the session as waiting. claude logs <id> shows the EnterWorktree "Do you want to proceed?" dialog above.
  3. The session stays blocked until someone runs claude attach <id> and answers in the terminal.

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.281 (Claude Code)

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Non-interactive/CI environment

Additional Information

  • The session was started with --permission-mode auto.
  • Not verified: whether other permission dialogs from a --bg session reach Remote Control correctly and only this EnterWorktree relocation dialog is affected, or whether no local-TUI dialogs are relayed.

View original on GitHub ↗