{"name":"CLAUDE_CODE_EMIT_SESSION_STATE_EVENTS","slug":"claude-code-emit-session-state-events","family":"env","title":"Environment variables","noun":"environment variable","description":"The Agent SDK now ends a run when Claude Code reports it is idle, which can mean waiting up to 10 minutes after the result","description_source":"entry","described_by":{"version":"2.1.284","anchor":"agent-sdk-now-asks-the-cli-for-session-state-by-default-and"},"presence":{"first_seen":"2.1.138","removed_in":null,"in_current_build":true,"newest_mined":"2.1.308","builds":149,"mined_builds":149,"first_cited":null},"aliases":[],"entries":[{"version":"2.1.284","anchor":"agent-sdk-now-asks-the-cli-for-session-state-by-default-and","heading":"Agent SDK runs can keep going after the result while background work finishes","line":"The Agent SDK now ends a run when Claude Code reports it is idle, which can mean waiting up to 10 minutes after the result","released_at":"2026-09-28 17:11:59","reason":"found in this entry's text, named in this entry"}],"entries_total":1,"docs":[{"source":"claude-code","path":"agent-sdk\/python","title":"Agent SDK reference - Python","documented":false}],"docs_total":1,"gates":[],"related":[{"name":"CLAUDE_CODE_EMIT_STARTUP_TIMING","slug":"claude-code-emit-startup-timing","description":"A new CLAUDE_CODE_EMIT_STARTUP_TIMING environment variable turns on startup-timing telemetry outside remote sessions"},{"name":"CLAUDE_CODE_EMIT_TOOL_USE_SUMMARIES","slug":"claude-code-emit-tool-use-summaries","description":"When true, after a main-thread turn runs tools (and is not aborted), Claude Code makes an extra tool-free model call that labels the completed tools from their names, inputs and outputs (each cut to 300 characters) plus up to 200 characters of the last assistant text, and emits the result as a `tool_use_summary` message. Off by default."}],"url":"https:\/\/changelogs.core-directive.com\/reference\/env\/claude-code-emit-session-state-events","family_url":"https:\/\/changelogs.core-directive.com\/reference\/env.json"}