CLAUDE_SLOW_FIRST_BYTE_MS
Updated by Alex Sorokoletov
CLAUDE_SLOW_FIRST_BYTE_MS is a Claude Code environment variable: Default 30,000ms. Logs a "Slow first byte: no stream chunk" observability event when the connection opens but produces no chunks within the window. Complements v2.1.107's byte watchdog. Added between v2.1.108 and v2.1.114 and still present in v2.1.294. It is not in the official reference.
| Status | Present in v2.1.294 |
|---|---|
| Added | Added between v2.1.108 and v2.1.114 |
| Category | Other |
| Official docs | Not listed |
How to set it
For one session, export it in the shell that starts Claude Code:
export CLAUDE_SLOW_FIRST_BYTE_MS=<value>
claudeTo apply it to every session, add it to the env object of a settings file:
// ~/.claude/settings.json
{
"env": {
"CLAUDE_SLOW_FIRST_BYTE_MS": "<value>"
}
}Release notes that mention it
- Claude Code v2.1.118 — 10 New Environment Variables: Forked Subagents Ship, Subscription Tiering Takes Shape
- Claude Code v2.1.114 — Native Binary Launcher, /fewer-permission-prompts, and 20 New Environment Variables
Related variables
CLAUDE_CODE_EXIT_AFTER_FIRST_RENDER: Exit after first UI render (testing).CLAUDE_CODE_INVESTIGATE_FIRST: Instructs the agent to read and investigate before acting — enforcing "read before write." Converts an agent that might immediately start editing into one that first gathers context.CLAUDE_CODE_SLOW_OPERATION_THRESHOLD_MS: Threshold for slow filesystem operation warnings.CLAUDE_CODE_CCR_FOLD_FIRST_TURN_RESCANANTHROPIC_BETAS: Comma-separated beta feature headers.ANTHROPIC_CUSTOM_HEADERS: Custom HTTP headers (newline-separated Key: Value).ANTHROPIC_FEDERATION_RULE_IDANTHROPIC_ORGANIZATION_ID
Frequently asked questions
What does CLAUDE_SLOW_FIRST_BYTE_MS do?
Default 30,000ms. Logs a "Slow first byte: no stream chunk" observability event when the connection opens but produces no chunks within the window. Complements v2.1.107's byte watchdog.
Which Claude Code version has CLAUDE_SLOW_FIRST_BYTE_MS?
Added between v2.1.108 and v2.1.114 and still present in v2.1.294.
How do I set CLAUDE_SLOW_FIRST_BYTE_MS?
Export it before starting Claude Code (export CLAUDE_SLOW_FIRST_BYTE_MS=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.