{"name":"state.json","slug":"state-json","family":"setting","title":"Settings keys","noun":"settings key","description":"Background job files can be stored somewhere other than disk, but nothing switches that on yet.","description_source":"entry","described_by":{"version":"2.1.223","anchor":"background-job-state-and-roster-writes-can-route-through-the"},"presence":{"first_seen":null,"removed_in":null,"in_current_build":false,"newest_mined":"2.1.336","builds":0,"mined_builds":175,"first_cited":{"version":"2.1.280","released_at":"2026-09-22 15:44:39","spans":3}},"aliases":[],"entries":[{"version":"2.1.333","anchor":"job-statejson-last-good-copy-fallback-and-efbig-handling","heading":"Background job records recover from damaged or oversized files","line":"If a background job's state.json cannot be read, Claude Code uses the last good copy, and it saves a smaller record when the file is too large","released_at":"2026-11-30 19:04:51","reason":"named in this entry, found in this entry's text"},{"version":"2.1.321","anchor":"new-dispatchentrypoint-field-in-background-job-state","heading":"Background jobs can record how they were started","line":"Saved state for background jobs can now hold an optional field recording which entry point launched the job","released_at":"2026-11-09 19:02:47","reason":"found in this entry's text"},{"version":"2.1.311","anchor":"new-telemetry-when-a-background-jobs-statejson-fails-schem","heading":"Claude Code now reports when a background job's saved state is rejected","line":"Claude Code now sends a usage report the first time a background job's state.json file fails its validity check","released_at":"2026-10-26 19:47:57","reason":"found in this entry's text"},{"version":"2.1.304","anchor":"claude-code-attribution-project-is-validated-as-a-claudeai","heading":"New CLAUDE_CODE_ATTRIBUTION_PROJECT setting checked against claude.ai Project IDs","line":"Claude Code now recognises `CLAUDE_CODE_ATTRIBUTION_PROJECT` and drops a value that is not a valid claude.ai Project ID from saved jobs","released_at":"2026-10-19 19:47:15","reason":"found in this entry's text"},{"version":"2.1.296","anchor":"background-job-state-ignored-environment-entries-are-now-re","heading":"Background jobs now say which saved environment entries they ignored and why","line":"When a background job loads its `state.json`, Claude Code now lists ignored environment entries with a reason for each","released_at":"2026-10-09 16:58:10","reason":"found in this entry's text"},{"version":"2.1.280","anchor":"provider-env-state-validated-against-saved-job-state","heading":"Provider env state validated against saved job state","line":"Restored background-job provider environment variables are now validated, not just copied","released_at":"2026-09-22 15:44:39","reason":"found in this entry's text"},{"version":"2.1.260","anchor":"new-kept-worktree-state-unpushed-shared","heading":"New kept-worktree state: unpushed_shared","line":"Worktrees shared with another finished job's unpushed commits are now kept instead of offered for discard.","released_at":"2026-09-03 22:32:02","reason":"found in this entry's text"}],"entries_total":7,"docs":[{"source":"claude-code","path":"agent-view","title":"Manage multiple agents with agent view","documented":false}],"docs_total":1,"gates":[],"related":[{"name":"state.set","slug":"state-set","description":"Plugin hooks modules gain `$.state.get` and `$.state.set`, a versioned shared value store only a value's owner can write"}],"url":"https:\/\/changelogs.core-directive.com\/reference\/setting\/state-json","family_url":"https:\/\/changelogs.core-directive.com\/reference\/setting.json"}