fix: add flag to disable workspace agent context sync (cherry-pick #28522) - #28525
Merged
Conversation
(cherry picked from commit 26de614)
Contributor
Docs preview📖 View docs preview for |
Contributor
|
👋 Hey @sreya! This PR is targeting the Only bug fixes should be cherry-picked to release branches. If this is a bug fix, please update the PR title to match the conventional commit format: If this is not a bug fix, it likely should not target a release branch. |
sreya
marked this pull request as ready for review
August 25, 2026 01:10
mtojek
approved these changes
Aug 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cherry-pick of #28522 (
26de6140fb) ontorelease/2.35.Adds
CODER_DISABLE_WORKSPACE_AGENT_CONTEXT_SYNC/--disable-workspace-agent-context-sync. When set,PushContextStaterejects agent context pushes with a dRPCUnimplementedcode before any validation or database work; deployed agents translate that intoErrPushUnimplementedand stop their push loop for the life of the connection. This gives large deployments a server-only kill switch for context sync database write load, with no agent updates or workspace restarts required.Two conflicts resolved relative to the original commit:
coderd/workspaceagentsrpc.go:release/2.35assignsContextDirtyMarker: api.chatDaemondirectly (the nil-guarded local was introduced later onmain); kept the branch's form and addedContextSyncDisabledalongside it.docs/admin/setup/configuration-reference.md: dropped; this generated doc does not exist onrelease/2.35.Validated on this branch:
go build,TestPushContextState(unit),TestWorkspaceAgentPushContextState*(end-to-end over real dRPC), CLI and enterprise golden-file tests, full pre-commit hooks.