claude-code - 💡(How to fix) Fix [BUG] Managed-settings approval dialog leaves the TUI dead after accept [2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#60718Fetched 2026-05-20 03:51:19
View on GitHub
Comments
2
Participants
2
Timeline
6
Reactions
0
Timeline (top)
labeled ×4commented ×2

When the "Managed settings require approval" dialog renders at startup, pressing Enter internally accepts the policy (settings are saved to disk, hooks become active) but the terminal appears frozen: no further screen ever renders. Only Ctrl+C exits.

Error Message

Error Messages/Logs

Root Cause

When the "Managed settings require approval" dialog renders at startup, pressing Enter internally accepts the policy (settings are saved to disk, hooks become active) but the terminal appears frozen: no further screen ever renders. Only Ctrl+C exits.

Code Example

export CLAUDE_CODE_OAUTH_TOKEN=sk-ant-oat01-...
rm -rf ~/.claude ~/.claude.json
claude

---

22:14:30.311  write(11, "\33[?2004h", 8)      # Ink mounts: bracketed-paste ON
22:14:30.333  write(11, "...Welcome to Claude Code v2.1.144...")
22:14:30.506  write(11, "...managed-settings dialog...")
22:14:31.432  read(0,  "\r", 1)               # user presses Enter
22:14:31.435  write(11, "\33[?2026h\33[?25h\33[?2026l", 22)   # unmount begins
22:14:31.435  write(1,  "\33[?1006l\33[?1003l\33[?1002l\33[?1000l", 32)
22:14:31.436  write(1,  "\33[>4m", 5)         # modifyOtherKeys OFF
22:14:31.436  write(1,  "\33[<u", 4)          # Kitty KBP OFF
22:14:31.437  write(1,  "\33[?1004l", 8)      # focus OFF
22:14:31.437  write(1,  "\33[?2031l", 8)      # colorScheme OFF
22:14:31.437  write(1,  "\33[?2004l", 8)      # bracketed-paste OFF
22:14:31.437  write(1,  "\33[?25h", 6)        # cursor ON
22:14:31.437  write(1,  "\0337\33[r\338", 7)  # save/reset-scroll/restore
22:14:31.438  write(11, "\33[?2004l", 8)      # mirror writes on fd 11
...
# NO further writes for 5+ minutes until user hits ^C

---

22:14:31.446  Remote settings: Saved to /home/coder/.claude/remote-settings.json
22:14:31.446  Remote settings: Applied new settings successfully
22:14:31.452  Plugin hooks: skipping reload, plugin-affecting settings unchanged
(no further log entries; process sits in epoll_pwait)

---
RAW_BUFFERClick to expand / collapse

Preflight Checklist

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

What's Wrong?

Summary

When the "Managed settings require approval" dialog renders at startup, pressing Enter internally accepts the policy (settings are saved to disk, hooks become active) but the terminal appears frozen: no further screen ever renders. Only Ctrl+C exits.

Environment

Claude Code version2.1.144 (Git SHA 32281b6b930f7e2ab4f0b5e2494e263b9c1ffb7e)
OS / shellDebian 13, bash
TerminalCursor integrated terminal (also reproduced under a stand-alone socat pty)
AuthCLAUDE_CODE_OAUTH_TOKEN bound to an org whose policy pushes a hooks setting via remote-settings

Steps to reproduce

export CLAUDE_CODE_OAUTH_TOKEN=sk-ant-oat01-...
rm -rf ~/.claude ~/.claude.json
claude

Dialog appears. Press Enter on "Yes, I trust these settings". Terminal freezes.

Evidence

strace -e trace=write,read -f -tt on a real run, single Enter pressed at t=31.432:

22:14:30.311  write(11, "\33[?2004h", 8)      # Ink mounts: bracketed-paste ON
22:14:30.333  write(11, "...Welcome to Claude Code v2.1.144...")
22:14:30.506  write(11, "...managed-settings dialog...")
22:14:31.432  read(0,  "\r", 1)               # user presses Enter
22:14:31.435  write(11, "\33[?2026h\33[?25h\33[?2026l", 22)   # unmount begins
22:14:31.435  write(1,  "\33[?1006l\33[?1003l\33[?1002l\33[?1000l", 32)
22:14:31.436  write(1,  "\33[>4m", 5)         # modifyOtherKeys OFF
22:14:31.436  write(1,  "\33[<u", 4)          # Kitty KBP OFF
22:14:31.437  write(1,  "\33[?1004l", 8)      # focus OFF
22:14:31.437  write(1,  "\33[?2031l", 8)      # colorScheme OFF
22:14:31.437  write(1,  "\33[?2004l", 8)      # bracketed-paste OFF
22:14:31.437  write(1,  "\33[?25h", 6)        # cursor ON
22:14:31.437  write(1,  "\0337\33[r\338", 7)  # save/reset-scroll/restore
22:14:31.438  write(11, "\33[?2004l", 8)      # mirror writes on fd 11
...
# NO further writes for 5+ minutes until user hits ^C

Counts across the entire trace:

  • \e[?2004h (Ink mount-enable): 1
  • \e[?2004l (Ink unmount-disable): 3 (one at dialog accept, two later at ^C exit)

The full terminal-mode-disable burst at t=31.435 is what an Ink instance emits when it unmounts. After that, no further Ink mount happens until ^C — the TUI is dead even though the process is alive.

Concurrent debug log confirms the internal state advanced fine — only the UI is gone:

22:14:31.446  Remote settings: Saved to /home/coder/.claude/remote-settings.json
22:14:31.446  Remote settings: Applied new settings successfully
22:14:31.452  Plugin hooks: skipping reload, plugin-affecting settings unchanged
(no further log entries; process sits in epoll_pwait)

So: the dialog code works, the settings are applied to disk, the org policy is active — but the user sees a frozen screen and assumes the approval failed.

Expected behavior

After Enter, the dialog dismisses and the next setup screen (theme picker / workspace trust / chat UI) renders in the same terminal — the way every other Ink dialog in Claude Code does.

Notes

  • Reproduces 100% on fresh state (rm -rf ~/.claude ~/.claude.json) whenever the org pushes any managed setting that triggers the approval dialog.
  • Reproduces both inside Cursor's integrated terminal and under a bare socat pty, so it isn't terminal-specific.
  • The dialog appears to be rendered with its own Ink instance during the CLI's pre-action phase, before the main onboarding Ink root mounts. The mode-disable burst above is consistent with that instance unmounting on accept; the subsequent onboarding render never produces any output. Maintainers with the original source can confirm — the bundled JS is too minified to point at a specific line confidently.

What Should Happen?

After Enter, the dialog dismisses and the next setup screen (theme picker / workspace trust / chat UI) renders in the same terminal — the way every other Ink dialog in Claude Code does.

Error Messages/Logs

Steps to Reproduce

  1. export CLAUDE_CODE_OAUTH_TOKEN=sk-ant-oat01-...
  2. rm -rf ~/.claude ~/.claude.json
  3. claude
  4. press enter to confirm to use the organization settings
  5. stuck

Claude Model

None

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.1.144

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

VS Code integrated terminal

Additional Information

No response

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

After Enter, the dialog dismisses and the next setup screen (theme picker / workspace trust / chat UI) renders in the same terminal — the way every other Ink dialog in Claude Code does.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] Managed-settings approval dialog leaves the TUI dead after accept [2 comments, 2 participants]