[BUG] ExitPlanMode approval prompt re-renders/duplicates in scrollback when session is resumed after idle
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?
Title: ExitPlanMode approval prompt re-renders/duplicates in scrollback when session is resumed (not an explicit resume, more like an alt+tab back to the relevant terminal) after idle
What happened
After the assistant called ExitPlanMode, the approval prompt (with the "yes / yes and auto-accept / no" options, plus a partial trailing section of the plan content) appeared several times in my transcript when I returned to the session after stepping away. From the assistant's side it was called once.
Why this is a problem
- Reading the plan above becomes hard because I have to scroll past multiple copies of the same approval menu and verification bullets.
- Because the transcript looks like it changed while I was away, it's ambiguous whether the assistant did something new — at first glance it reads like an attention-grabbing poke.
Expected
ExitPlanMode renders its prompt exactly once, in place, and subsequent session resumes don't re-emit the prompt or partial plan content into scrollback.
Environment
- Claude Code CLI, plan mode
- Session was left idle and resumed some time later
- Long plan file (~200 lines) written to ~/.claude/plans/<name>.md just before the ExitPlanMode call
Repro (best guess)
- Enter plan mode, let the assistant write a multi-section plan file and call ExitPlanMode.
- Leave the terminal idle long enough for a screen refresh / reconnect.
- Come back — observe duplicated approval prompt(s) and trailing plan content in scrollback.
What Should Happen?
Expected
ExitPlanMode renders its prompt exactly once, in place, and subsequent session resumes don't re-emit the prompt or partial plan content into scrollback.
Error Messages/Logs
Steps to Reproduce
Repro (best guess)
- Enter plan mode, let the assistant write a multi-section plan file and call ExitPlanMode.
- Leave the terminal idle long enough for a screen refresh / reconnect.
- Come back — observe duplicated approval prompt(s) and trailing plan content in scrollback.
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.116 (Claude Code)
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Other
Additional Information
Terminal: gnome-terminal
$ ps -o 'cmd=' -p $(ps -o 'ppid=' -p $$)
/usr/libexec/gnome-terminal-server
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗