Skip to content

fix: add flag to disable workspace agent context sync (cherry-pick #28522) - #28525

Merged
mtojek merged 1 commit into
release/2.35from
backport-28522-2.35
Aug 25, 2026
Merged

fix: add flag to disable workspace agent context sync (cherry-pick #28522)#28525
mtojek merged 1 commit into
release/2.35from
backport-28522-2.35

Conversation

@sreya

@sreya sreya commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

Cherry-pick of #28522 (26de6140fb) onto release/2.35.

Adds CODER_DISABLE_WORKSPACE_AGENT_CONTEXT_SYNC / --disable-workspace-agent-context-sync. When set, PushContextState rejects agent context pushes with a dRPC Unimplemented code before any validation or database work; deployed agents translate that into ErrPushUnimplemented and 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.35 assigns ContextDirtyMarker: api.chatDaemon directly (the nil-guarded local was introduced later on main); kept the branch's form and added ContextSyncDisabled alongside it.
  • docs/admin/setup/configuration-reference.md: dropped; this generated doc does not exist on release/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.

@github-actions

Copy link
Copy Markdown
Contributor

Docs preview

📖 View docs preview for docs/reference/api/general.md

@github-actions

Copy link
Copy Markdown
Contributor

👋 Hey @sreya!

This PR is targeting the release/2.35 release branch, but its title does not start with fix: or fix(scope):.

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:

fix: description of the bug fix
fix(scope): description of the bug fix

If this is not a bug fix, it likely should not target a release branch.

@sreya
sreya marked this pull request as ready for review August 25, 2026 01:10
@sreya sreya changed the title feat: add flag to disable workspace agent context sync (cherry-pick #28522) fix: add flag to disable workspace agent context sync (cherry-pick #28522) Aug 25, 2026
@sreya
sreya requested a review from mtojek August 25, 2026 01:12
@mtojek
mtojek merged commit de7a285 into release/2.35 Aug 25, 2026
60 checks passed
@mtojek
mtojek deleted the backport-28522-2.35 branch August 25, 2026 06:33
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 25, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants