[BUG] --dangerously-skip-permissions -c combination causes "F1H is not a function" crash on session restore

Resolved 💬 3 comments Opened Apr 27, 2026 by melody-story Closed Apr 28, 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?

Running claude --dangerously-skip-permissions -c crashes immediately without launching the REPL. The onSessionRestored callback (F1H) is undefined when the F2q hook is initialized with enabled: false,
but the -c flag triggers session restoration and calls the callback without a null guard, resulting in a TypeError.

What Should Happen?

Using --dangerously-skip-permissions and -c together should resume the most recent session while bypassing permission prompts. Both flags work correctly in isolation, so the combination should work as
well.

Error Messages/Logs

ERROR  F1H is not a function. (In 'F1H(q)', 'F1H' is undefined)                                                                                                                                         

  /$bunfs/root/src/entrypoints/cli.js:9251:5663                                                                                                                                                             
   
   - <anonymous> (/$bunfs/root/src/entrypoints/cli.js:9251:5663)                                                                                                                                            
   - WR (/$bunfs/root/src/entrypoints/cli.js:492:63749)  
   - UY (/$bunfs/root/src/entrypoints/cli.js:492:76948)                                                                                                                                                     
   - j5 (/$bunfs/root/src/entrypoints/cli.js:492:76827)                                                                                                                                                   
   - UY (/$bunfs/root/src/entrypoints/cli.js:492:77745)                                                                                                                                                     
   - j5 (/$bunfs/root/src/entrypoints/cli.js:492:76827)  
   - UY (/$bunfs/root/src/entrypoints/cli.js:492:76926)                                                                                                                                                     
   - j5 (/$bunfs/root/src/entrypoints/cli.js:492:76827)                                                                                                                                                   
   - UY (/$bunfs/root/src/entrypoints/cli.js:492:77745)                                                                                                                                                     
   - j5 (/$bunfs/root/src/entrypoints/cli.js:492:76827)                                                                                                                                                   
   - async <anonymous> (/$bunfs/root/src/entrypoints/cli.js:18808:11089)

Steps to Reproduce

  1. Navigate to a directory with an existing Claude Code session
  2. Run the following command:

claude --dangerously-skip-permissions -c

  1. Reproducibility: 100%

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

Unknown

Claude Code Version

2.1.119

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Warp

Additional Information

  • claude -c alone: works correctly
  • claude --dangerously-skip-permissions alone: works correctly
  • Crash only occurs when both flags are used together

Analysis of the minified source reveals the problematic call site:

// onSessionRestored (F1H) is undefined when F2q is initialized with enabled: false
let { onSessionRestored: F1H } = F2q({ enabled: false, ... })

useEffect(() => {
if (q && q.length > 0) {
F1H(q) // ← no null guard; TypeError when F1H is undefined
}
}, [])

Suggested fix: Add a null guard at the call site — F1H?.(q) — or ensure F2q returns a no-op function when enabled: false.

Workaround: Use the flags separately until resolved.

claude -c # resume session (with permission prompts)
claude --dangerously-skip-permissions # new session (permissions bypassed)

View original on GitHub ↗

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