CLAUDE_CODE_FRAME_TIMING_SAMPLE_EVERY
Updated by Alex Sorokoletov
CLAUDE_CODE_FRAME_TIMING_SAMPLE_EVERY is a Claude Code environment variable: When frame-timing logging is enabled, includes the extra per-frame memory sample every Nth frame; minimum 1, defaults to 1. Added between v2.1.143 and v2.1.212 and still present in v2.1.332. It is not in the official reference.
| Status | Present in v2.1.332 |
|---|---|
| Added | Added between v2.1.143 and v2.1.212 |
| 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_FRAME_TIMING_SAMPLE_EVERY=<value>
claudeTo apply it to every session, add it to the env object of a settings file:
// ~/.claude/settings.json
{
"env": {
"CLAUDE_CODE_FRAME_TIMING_SAMPLE_EVERY": "<value>"
}
}Related variables
CLAUDE_CODE_EMIT_STARTUP_TIMING: When set, emits startup timing phase metrics, which are also emitted in remote mode; otherwise they are not reported.CLAUDE_CODE_INTRO_FRAME: Armed the intro frame when set to a truthy value, overriding the server flag; read until v2.1.294.CLAUDE_CODE_PER_TURN_TIMING: When set, enables per-turn timing for models that support it; without it the feature stays off.CLAUDE_RUNNER_ALIVE_EVERY_MS: Interval in milliseconds for emitting an 'alive_before_init' heartbeat on the activity channel while the child has not yet initialized; no heartbeat is emitted when unset.CLAUDE_CODE_COWORK_FRAME_ARTIFACTSCLAUDE_CODE_OWNERSHIP_FRAMEANTHROPIC_BETAS: Comma-separated beta feature headers.ANTHROPIC_CUSTOM_HEADERS: Custom HTTP headers (newline-separated Key: Value).
Frequently asked questions
What does CLAUDE_CODE_FRAME_TIMING_SAMPLE_EVERY do?
When frame-timing logging is enabled, includes the extra per-frame memory sample every Nth frame; minimum 1, defaults to 1.
Which Claude Code version has CLAUDE_CODE_FRAME_TIMING_SAMPLE_EVERY?
Added between v2.1.143 and v2.1.212 and still present in v2.1.332.
How do I set CLAUDE_CODE_FRAME_TIMING_SAMPLE_EVERY?
Export it before starting Claude Code (export CLAUDE_CODE_FRAME_TIMING_SAMPLE_EVERY=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.