CLAUDE_CODE_STOP_HOLD_SECONDS
Updated by Alex Sorokoletov
CLAUDE_CODE_STOP_HOLD_SECONDS is a Claude Code environment variable: In remote sessions, sets the number of seconds the session holds at stop while notifications are still pending. A value of 0 turns the hold off. Added in v2.1.337 and still present in v2.1.337. It is not in the official reference.
| Status | Present in v2.1.337 |
|---|---|
| Added | Added in v2.1.337 |
| Category | Other |
| Official docs | Not listed |
How to set it
For one session, export it in the shell that starts Claude Code:
export CLAUDE_CODE_STOP_HOLD_SECONDS=<value>
claudeTo apply it to every session, add it to the env object of a settings file:
// ~/.claude/settings.json
{
"env": {
"CLAUDE_CODE_STOP_HOLD_SECONDS": "<value>"
}
}Release notes that mention it
- claude-code-env-vars-v2-1-337
- Claude Code Version Tracker: Undocumented Env Vars, Feature Gates & Models
Related variables
CLAUDE_CODE_EXIT_AFTER_STOP_DELAY: Delay before exit after stop signal (ms).CLAUDE_CODE_HOLD_REPORT_PARK_AT_INIT: Reported a parked turn at initialization, but only when CLAUDE_CODE_RESUME_INTERRUPTED_TURN was also set; read until v2.1.309.CLAUDE_CODE_MAIN_REPLY_HOLD_MS: Number of milliseconds to hold back the main reply stream before handing pieces on; applies only when the relevant transport is active and defaults to 0.CLAUDE_CODE_SILENT_TURN_REMINDER_SECONDS: Set the number of seconds of silence before the silent-turn reminder fired; when unset, a configured setting applied.CLAUDE_CODE_STOP_HOOK_BLOCK_CAP: Cap how long a stop hook can block session termination.CLAUDE_CODE_UNWATCHED_REPLY_HOLD_MS: Number of milliseconds to hold streamed replies for unwatched contexts (subagent, auxiliary, compaction); defaults to 0, meaning no hold.CLAUDE_CODE_EMIT_STOP_HOOK_EVENTSCLAUDE_CODE_PARKED_STOP_RETIRES
Frequently asked questions
What does CLAUDE_CODE_STOP_HOLD_SECONDS do?
In remote sessions, sets the number of seconds the session holds at stop while notifications are still pending. A value of 0 turns the hold off.
Which Claude Code version has CLAUDE_CODE_STOP_HOLD_SECONDS?
Added in v2.1.337 and still present in v2.1.337.
How do I set CLAUDE_CODE_STOP_HOLD_SECONDS?
Export it before starting Claude Code (export CLAUDE_CODE_STOP_HOLD_SECONDS=value), or add it to the "env" object in ~/.claude/settings.json to apply it to every session.
All variables, searchable: Claude Code environment variables.