Skip to content

fix: log warnings for malformed settings files instead of silent fallback#486

Merged
benbrandt merged 1 commit intoagentclientprotocol:mainfrom
tbounsiar:fix/settings-silent-errors
Mar 27, 2026
Merged

fix: log warnings for malformed settings files instead of silent fallback#486
benbrandt merged 1 commit intoagentclientprotocol:mainfrom
tbounsiar:fix/settings-silent-errors

Conversation

@tbounsiar
Copy link
Copy Markdown
Contributor

Summary

  • loadSettingsFile() silently returned {} for all errors including malformed JSON, permission errors, and unexpected file content
  • Only ENOENT (file not found) should be silent since missing settings files are expected
  • Other errors now log a warning via the logger to help diagnose misconfigured settings (e.g. a typo in settings.json was previously completely invisible)

Test plan

  • npm run lint passes
  • All settings tests pass
  • Missing files still return {} silently (ENOENT path unchanged)
  • Malformed JSON now produces a logged warning

…back

loadSettingsFile silently returned {} for all errors including malformed
JSON, permission errors, and unexpected file content. Only ENOENT (file
not found) should be silent since missing settings files are expected.
Other errors now log a warning to help diagnose misconfigured settings.
@benbrandt benbrandt enabled auto-merge (squash) March 27, 2026 12:10
@benbrandt benbrandt merged commit ae6c388 into agentclientprotocol:main Mar 27, 2026
1 check passed
benbrandt pushed a commit that referenced this pull request Apr 3, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.25.0](v0.24.2...v0.25.0)
(2026-04-03)


### Features

* Add auto permission mode support
([#501](#501))
([a161453](a161453))
* Add separate Claude and Console terminal logins
([#502](#502))
([063cd35](063cd35))
* Update to claude-agent-sdk 0.2.91
([#500](#500))
([65a2230](65a2230))


### Bug Fixes

* log warnings for malformed settings files instead of silent fallback
([#486](#486))
([ae6c388](ae6c388))
* prevent race conditions in SettingsManager setCwd and debounce
([#485](#485))
([7506223](7506223))
* use current model's context window for usage_update size
([#412](#412))
([d07799d](d07799d))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: acp-release-bot[bot] <246668977+acp-release-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants