/limit-reset isn't available in this environment.
The message
/limit-reset isn't available in this environment.What it means
You typed the command into a session with no interactive terminal, such as claude -p or a program driving Claude Code. It's about where you ran it. Your account and your reset were never checked.
What to do
Open Claude Code in a terminal with claude (add --continue to pick the conversation back up) and run /limit-reset there while you're at the session limit.
You're at a usage limit, you send /limit-reset, and instead of a reset or a refusal about your account you get this:
/limit-reset isn't available in this environment.
I went through the shipped binary (version 2.1.280) to trace it. The line comes from a generic template in the part of Claude Code that routes slash commands, well before the reset command itself would run, and it fires because of the kind of session you typed into.
Which sessions print it
Claude Code keeps a flag on every session saying whether a person is sitting at an interactive terminal. Print mode, claude -p, runs without one. So do the stream-json sessions that other programs use to drive Claude Code, which is how a script or an app built on top of it talks to the CLI. The code also knows about cloud sessions on this branch (it has special wording for three unrelated commands there), and /limit-reset falls through to the generic line in those too.
In any session without a terminal, the command list is filtered down to two kinds of command: prompts that haven't opted out of headless use, and local commands that declare they work without a screen. /limit-reset is neither. It's built as a terminal interface component (local-jsx in the code), because the reset flow draws its own prompts and status lines, so it never makes the list.
When the name you typed isn't in that list but matches one of Claude Code's built-in commands, you get this line. Type a name that isn't built in at all and you'd get Unknown command instead, which is how you can tell the two apart.
What it doesn't mean
The dispatcher stops before anything about your account happens. The server isn't asked whether you're eligible and no reset is spent. Nor is the command passed to the model, so the line costs you no tokens. In print mode's output it shows up wrapped as local command output, which is why people paste it with the <local-command-stdout> tags still on.
So there's nothing to read into it about your plan or your weekly ration. You haven't lost the reset, and you haven't been ruled out of it.
How to run the reset instead
Open Claude Code the ordinary way, with claude in a terminal. If you want the same conversation back, claude --continue picks up the most recent one in that folder and claude --resume lets you choose. Then run /limit-reset while you're stopped at the five-hour session limit.
From there you'll either get the reset, with a line telling you when the next one is due, or the account-level refusal: A session-limit reset isn't available right now. That one does depend on your account and on timing, and we went through every check behind it on its own page.
If your work runs unattended in print mode, a script can't take the reset for you. The setting that continues automatically when a limit resets is on by default in the interactive terminal, and it's the closest thing to hands-off. Our write-up of what /limit-reset actually resets compares it with the other two options.
Other commands that print the same line
/low-priority behaves the same way. It's a local command that explicitly says it can't run without a terminal, so a headless session answers it with /low-priority isn't available in this environment. The mode it would start has its own account-side refusal, covered here.
A separate guard catches a terminal-interface command that reaches the dispatcher in a headless session anyway, and its wording runs longer:
/limit-reset opens an interactive panel and isn't available in this environment. Run it from the Claude Code terminal instead.
Other lines the same feature prints
Match yours against these if the one at the top of the page is not quite it. They come from the same code and mean related things.
❯ /limit-reset ⎿ /limit-reset isn't available in this environment.<local-command-stdout>/limit-reset isn't available in this environment.</local-command-stdout>/limit-reset opens an interactive panel and isn't available in this environment. Run it from the Claude Code terminal instead./low-priority isn't available in this environment.