claude-code - 💡(How to fix) Fix [BUG] "/memory command leaves terminal in broken state after exit (focus reporting + modifyOtherKeys not disabled)"

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…

Error Message

Error Messages/Logs

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?

I tried /memory to see how many tokens my CLAUDE.md file was taking. I selected option #1 Project memory. The terminal seemed close and I'm switched to the last window I used. But I could return to the iTerm terminal and if I typed anything I got the following characters. ^[[O^[[I^[[27;5;99~^[[27;5;99~^[[27;5;99~^[[27;5;99~^[[27;5;120~^[[27;5;120~^[[27;5;120~^[[27;5;99~^[[27;5;99~^[[O^[[I^[[O^[[Ireset

The same thing happens in the default terminal. showing ^[[O^[[I^[[O^[[Iory Checked in at ./CLAUDE.md

What Should Happen?

it should have shown me something relating to my Project memory.

Error Messages/Logs

Steps to Reproduce

run a new instance of claude code by typing claude in a terminal. once in claude code, enter /memory. select option 1.

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.1.114

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

iTerm2

Additional Information

iTerm Build 3.6.9

extent analysis

TL;DR

The issue may be related to incorrect terminal escape sequence handling in Claude Code, causing the terminal to print unexpected characters after selecting the "Project memory" option.

Guidance

  • Verify that the issue is specific to the /memory command with option #1 by trying other commands and options in Claude Code.
  • Check if the problem occurs in other terminals or shells, such as the default Terminal app on macOS, to isolate the issue.
  • Investigate if there are any known issues or updates related to terminal escape sequence handling in Claude Code version 2.1.114.
  • Try resetting the terminal settings or restarting the terminal to see if the issue persists.

Example

No code snippet is provided as the issue seems to be related to terminal interaction and escape sequence handling.

Notes

The issue may be specific to the combination of Claude Code version 2.1.114, iTerm2, and macOS. Further investigation is needed to determine the root cause.

Recommendation

Apply workaround: Try using a different terminal or shell to see if the issue is specific to iTerm2, and report back to the developers with more information.

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…

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] "/memory command leaves terminal in broken state after exit (focus reporting + modifyOtherKeys not disabled)"