[DOCS] Cross-reference the "--resume doesn't restore permission mode" note from permission-modes.md and remote-control.md

Status Open
Maintainer reply None cached
Activity 0 comments · opened Sep 26, 2026

Documentation Type

Incorrect/outdated documentation

Documentation Location

  1. docs/en/hooks.md (PreToolUse "defer" section) — has the actual behavior note; 2. docs/en/permission-modes.md — silent on it; 3. docs/en/remote-control.md — silent on it

Section/Topic

  1. docs/en/hooks.md (PreToolUse "defer" section) — has the actual behavior note; 2. docs/en/permission-modes.md — silent on it; 3. docs/en/remote-control.md — silent on it

Current Documentation

hooks.md's PreToolUse "defer" section states: "--resume does not restore the
permission mode from the prior session. Pass the same --permission-mode flag
on resume that was active when the tool was deferred. Claude Code logs a
warning if the modes differ."

This is the only place this general behavior is documented. Nothing in
permission-modes.md (the natural place to look for permission-mode behavior)
or remote-control.md (which documents --permission-mode as a flag for the
server's spawned/pre-created sessions) mentions it.

What's Wrong or Missing?

A user who launches claude remote-control --permission-mode acceptEdits,
then later inspects the pre-created session via claude --resume <id> or
claude --continue without repeating the flag, sees the session in
permissions.defaultMode (e.g. auto) instead of acceptEdits — and reasonably
concludes Remote Control dropped the flag. It didn't: the flag reaches the
spawned child's argv and a set_permission_mode control message is
acknowledged over the bridge at spawn time (confirmed via --debug-file). The
resume/continue behavior is working as documented — just documented somewhere
unrelated to the surface where the confusion happens.

Related: #56883 (closed stale, unresolved) — the same hooks.md note is also
out of date in the other direction: plan mode specifically is restored on
resume since v2.1.132 in the hook-defer workflow, which the note's current
absolute wording ("does not restore") no longer reflects for that one case.

Suggested Improvement

Add to permission-modes.md:

Resuming a session (--resume/--continue) does not restore its prior permission mode unless --permission-mode is passed again on the resuming invocation — it re-resolves from permissions.defaultMode in settings, or the built-in default, the same as a new session would. One exception: since v2.1.132, plan mode is restored automatically when resuming a session that was deferred mid-tool-call via a PreToolUse hook (see hooks.md).

Add to remote-control.md, next to the --permission-mode flag description:

This sets the mode the pre-created/spawned session starts in. Attaching later via --resume/--continue does not preserve it automatically — see permission-modes.md.

Update hooks.md's note to drop the now-inaccurate absolute wording per #56883
rather than leaving two open reports against the same paragraph.

Impact

Medium - Makes feature difficult to understand

Additional Context

_No response_

View original on GitHub ↗