/resume fails with invalid --permission-mode for sessions containing "permissionMode":"bubble"
Resuming a session that was previously run as a background job fails immediately with:
error: option '--permission-mode' argument 'bubble' is invalid. Allowed choices are acceptEdits, auto, bypassPermissions, default, dontAsk, plan.
The session's stored transcript (~/.claude/projects/<project>/<session-id>.jsonl) contains turns with "permissionMode":"bubble" — an internal-only mode apparently used for background/task-notification turns ("origin":{"kind":"task-notification"}, "promptSource":"system", "queuePriority":"later"). It looks like bubble is not one of the six values the interactive --permission-mode flag accepts, but /resume still tries to pass the session's last-used mode straight through to that flag, so it fails validation before init and the session becomes unresumable via /resume.
Repro:
- Trigger a background job/task-notification turn in a session (mode ends up recorded as
bubblein the session's.jsonl). - Run
/resume <that session>(orclaude --resume <session-id>) with no explicit--permission-mode. - Command fails immediately with the invalid-argument error above, before any init.
Workaround: explicitly pass a valid mode to override the stored one:
claude --resume <session-id> --permission-mode default
This works and restores the session.
Expected: /resume should either translate internal modes like bubble to a valid CLI value, or ignore an invalid stored mode and fall back to default instead of failing before init.
Environment:
- Claude Code: 2.1.198
- OS: macOS 26.5.1 (BuildVersion 25F80)
- Node: v25.8.0
- Shell: zsh