Fix: Config Get returns stale data after Patch#20636
Fix: Config Get returns stale data after Patch#20636Liyw979 wants to merge 1 commit intoanomalyco:devfrom
Conversation
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 2 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
|
Hey! Your PR title Please update it to start with one of:
Where See CONTRIBUTING.md for details. |
|
The following comment was made by an LLM, it may be inaccurate: Based on the search results, I found one potentially related PR: Related PR:
The other results are not relevant duplicates - PR #14743 is about Anthropic prompt caching (unrelated) and PR #20316 is about sandboxing configuration (different feature). |
- Change config file path from config.json to opencode.json to match the auto-loader which reads from .opencode/opencode.json - Add invalidate() call to clear config cache after writing - Add integration test for patch then get config flow
|
This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window. Feel free to open a new pull request that follows our guidelines. |
Issue for this PR
Closes #
Type of change
Description
After calling the
patch /configendpoint to add a custom agent configuration, immediately reading from the/configreturned stale data without the newly patched agent configuration.What does this PR do?
This PR fixes a configuration caching issue where Config.get() returns stale data after calling Config.update(). The fix ensures that:
How did you verify your code works?
I added a failing test case
Screenshots / recordings
If this is a UI change, please include a screenshot or recording.
Checklist