{"version":"2.1.281","anchor":"config-env-application-resets-cached-state-afterwards","canonical_anchor":"config-env-application-resets-cached-state-afterwards","heading":"Config env application resets cached state afterwards","tier":null,"area":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.281\/e\/config-env-application-resets-cached-state-afterwards","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.281","markdown":"### Config env application resets cached state afterwards\n\nApplying environment variables from settings now always runs a reset step afterwards, and ending a session gained a cleanup step\n\n**Unclear.** The finding does not say what the reset step clears or what the new cleanup at session end does.\n\n**What**\n\nClaude Code can set environment variables (named values handed to programs it runs) from your configuration. Two routines do this: `applySafeConfigEnvironmentVariables` and `applyConfigEnvironmentVariables`. New wrappers around both now always run a reset step afterwards, even if applying the variables fails partway.\n\nThe code that runs when a session (one continuous conversation with Claude Code) ends also gained a cleanup step that always runs.\n\n**Why**\n\nIn practice, information Claude Code has stored and reused is cleared after environment variables from your configuration are applied, so it does not keep using values from before the change."}