[BUG] Cannot scroll back past start of Claude
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?
I switched from my old laptop to a new one a couple of days ago. I have copied over everything exactly as it was, but I reinstalled Claude and some other utilities, and ended up with a slightly newer version.
In the past, I was able to run some commands, start Claude, scroll back and examine the output etc of those commands, and continue to use Claude. I find that after I switched computers, I was no longer able to do that.
With the help of Claude, I discovered a workaround, but it implored me to report this as a bug.
It is _possible_ that something on my old computer affected this behavior, but me and Claude both have examined pretty much every nook and cranny and come up with no alternate explanation to this behavior change. In particular, on the old computer, I tried /terminal-setup briefly when Claude told me to, but quickly reverted it when I found out that it basically broke my Swedish keyboard (see #1793), and so I have not tried that again on the new computer.
What Should Happen?
Claude should allow me to scroll back, or at least have a documented way to control this behavior.
Error Messages/Logs
Steps to Reproduce
Run Claude. Attempt to scroll back past the start of the Claude session.
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
2.0.27 (Claude Code)
Claude Code Version
2.0.28 (Claude Code)
Platform
AWS Bedrock
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
The workarounds Claude proposed, with some hesitation and speculation, was to run with TERM=vt100 or TERM_PROGRAM_INHIBIT_ALTSCREEN=1. I have preferred the latter.
11 Comments
Found 2 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
In case you need the workaround,
In actual fact I am using a slightly more complex shell function because I want to control some other things as well. (In particular, see also #7121.)
This workaround is rather incomplete, though.
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
Yes, this is still an issue.
This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.
Erroneously closed, see https://github.com/anthropics/claude-code/issues/16497
Even with the workaround in place, everything is nuked from the scrollback buffer when Claude compacts the conversation. See also https://github.com/anthropics/claude-code/issues/2479
Also reported at https://github.com/anthropics/claude-code/issues/13308
I get no google hits of "TERM_PROGRAM_INHIBIT_ALTSCREEN", I wonder whether it's a real apple thing, or it may be hallucinated. If it's not hallucinated, and not documented publicly, how the model would know it?
I'm afraid I can't remember where it came from, perhaps Claude simply hallucinated that this should exist. I also cannot find it in the code base.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.