CLAUDE_ENABLE_BYTE_WATCHDOG

Updated by

CLAUDE_ENABLE_BYTE_WATCHDOG is a Claude Code environment variable: Activates a byte-level watchdog on API response streams. The v2.1.105 changelog describes a fix for stalled API streams: "streams now abort after 5 minutes of no data and retry non-streaming instead of hanging indefinitely." This variable likely gates that behavior — when enabled, the runtime monitors incoming byte…. Added between v2.1.104 and v2.1.107 and still present in v2.1.294. It is listed in the official reference.

StatusPresent in v2.1.294
AddedAdded between v2.1.104 and v2.1.107
CategoryNetwork and proxy
Official docsListed

How to set it

For one session, export it in the shell that starts Claude Code:

export CLAUDE_ENABLE_BYTE_WATCHDOG=<value>
claude

To apply it to every session, add it to the env object of a settings file:

// ~/.claude/settings.json
{
  "env": {
    "CLAUDE_ENABLE_BYTE_WATCHDOG": "<value>"
  }
}

Release notes that mention it

Related variables

Frequently asked questions

What does CLAUDE_ENABLE_BYTE_WATCHDOG do?

Activates a byte-level watchdog on API response streams. The v2.1.105 changelog describes a fix for stalled API streams: "streams now abort after 5 minutes of no data and retry non-streaming instead of hanging indefinitely." This variable likely gates that behavior — when enabled, the runtime monitors incoming byte…

Which Claude Code version has CLAUDE_ENABLE_BYTE_WATCHDOG?

Added between v2.1.104 and v2.1.107 and still present in v2.1.294.

How do I set CLAUDE_ENABLE_BYTE_WATCHDOG?

Export it before starting Claude Code (export CLAUDE_ENABLE_BYTE_WATCHDOG=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.