You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug: claude-code keeps stale configuration after managed settings or API key helper are disabled #1156
The claude-code module creates configuration files when managed_settings or api_key_helper is configured, but leaves those files behind when the corresponding input is later set to null.
On workspaces where these files survive a restart, Claude Code can therefore continue using settings or an authentication helper that was removed from the template. Users have to manually delete the generated files for the change to take effect.
Start a workspace with managed_settings configured.
Update the template to set managed_settings = null.
Apply the updated template and restart the workspace, preserving /etc/claude-code.
Check managed-settings.d/10-coder.json: it still contains the previous settings.
The same issue occurs when configuring api_key_helper and subsequently setting it to null, preserving both /etc/claude-code and the user's home directory.
Expected Behavior
Disabling either input should remove the corresponding files created by the module, while preserving unrelated Claude Code configuration.
Currently, write_managed_settings() and setup_api_key_helper() return immediately when their input is empty, without cleaning up files from a previous run.
Activity
linear-code commentedon Sep 29, 2026
REG-123
fix(claude-code): remove disabled managed configuration (coder#1164)