Left arrow on an empty prompt silently backgrounds an interactive session, forking the conversation with no way back

Status Open
Maintainer reply None cached
Activity 2 comments · opened Aug 5, 2026

Environment

  • Claude Code v2.1.221 (native build), Windows 11
  • Long-running normal interactive session, started with plain claude at a git repo root (the session had also entered a git worktree via the worktree feature earlier, which matters below)

What happened

  1. Pressed the LEFT ARROW key on an empty prompt - a stray keypress, not an intentional action. This appears to be the documented binding ("Press left arrow on an empty prompt to detach and return to agent view").
  2. The session silently detached into the background-agents view (the "Needs input / Working / Completed" screen) and became a background job: a wrapper appeared under ~/.claude/jobs/<short-id>/ with "template": "bg", "backend": "daemon", and the session was driven by the daemon from then on.
  3. Interacting with it from the agent view works, but at end of turn the UI bounces back to the list ("That session ended - back to the list") instead of staying attached like a normal chat.

The fork

The detach did not move the conversation - it forked it:

  • The original session file stayed behind under its original project key, frozen mid-task, and still shows in /resume under the same display name.
  • The daemon continued the conversation under a NEW session id, filed under a DIFFERENT project key (the session's current working directory - the worktree - rather than the launch directory), so the live continuation was invisible to /resume at the repo root.
  • Resuming the orphaned original days later resumes an assistant whose context is frozen at the fork point - it believes work that has long since merged is still in flight, and will happily act on that stale world. Two same-named entries, no indication which is the live one.

What's missing

  • No confirmation on the detach, and no undo. One silent keypress changes the session's lifecycle model.
  • No documented way to convert a background session back into a regular interactive session - no key in the agent view, no CLI verb. The only recovery found: manually delete the ~/.claude/jobs/<short-id>/ wrapper (undocumented; the transcript survives since it lives under ~/.claude/projects/), then claude --resume <session-id> from the session's directory.
  • After that manual recovery the /resume picker still shows the session with a bg badge - the flag persists somewhere outside the deleted wrapper (not in the jobs dir, and no obvious field in the transcript head).

Expected

  • A lifecycle change (interactive -> background agent) should confirm, or at minimum be trivially reversible with an obvious inverse action.
  • A documented "promote back to interactive" action, in the agent view and/or as a CLI verb.
  • Backgrounding should not fork the conversation: one thread, one picker entry, whichever mode is driving it.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗