Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat(coderd): lower chat stream silence timeout and make it configurable - #28405

Closed
ibetitsmike wants to merge 2 commits into
mike/chatd-mcp-observabilityfrom
mike/chatd-stream-silence-timeout
Closed

feat(coderd): lower chat stream silence timeout and make it configurable#28405
ibetitsmike wants to merge 2 commits into
mike/chatd-mcp-observabilityfrom
mike/chatd-stream-silence-timeout

Conversation

@ibetitsmike

@ibetitsmike ibetitsmike commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

Stack context

MCP connect-stall incident follow-up. Below: #28400 (connect budget enforcement), #28402 (connect/prep observability). This layer tightens the stream-level resilience knob.

Why

During the incident a wedged provider stream held a generation for the full 10-minute silence guard before the retry kicked in. Ten minutes is far slower than any legitimate provider pause; the guard exists to catch dead streams, not to give providers ten minutes of grace.

Changes

  • defaultStreamSilenceTimeout in chatloop drops from 10 to 5 minutes.
  • The timeout is now configurable per deployment via the hidden --chat-stream-silence-timeout flag / CODER_CHAT_STREAM_SILENCE_TIMEOUT env (default 5m), wired through chatd.Config.StreamSilenceTimeout into GenerateAssistantOptions, so dogfood can tune it without a release.
  • make gen artifacts (apidoc, typesGenerated, server config golden, docs) regenerated.

Tests

Existing chatloop silence-guard tests pass with the new default (go test ./coderd/x/chatd/chatloop/ ./coderd/x/chatd/); the timeout remains injected via options in tests, so no behavior-dependent test needed changes.

🤖 Mux authored this PR on Mike's behalf.

During the MCP connect-stall incident a wedged provider stream held a
turn for the full 10 minute silence guard. Lower the default to 5
minutes and expose it as a hidden deployment option
(--chat-stream-silence-timeout / CODER_CHAT_STREAM_SILENCE_TIMEOUT)
so deployments like dogfood can tune it without a release.
@github-actions

Copy link
Copy Markdown
Contributor

Docs preview

Check off each page once it's been reviewed. If a page changes in a later push, its checkbox clears automatically so it gets a fresh look. Pages not yet wired into the docs navigation aren't listed here.

@ibetitsmike

Copy link
Copy Markdown
Collaborator Author

Dropping this from the chatd resilience stack along with #28406: keeping the existing 10m default stream silence timeout and not adding a deployment option for it. With the MCP connect budget (#28400) bounding the common stall source, the extra knob isn't warranted. The commit remains recoverable from this closed PR if we revisit.

Xum closed this PR on @ibetitsmike's behalf.

@ibetitsmike
ibetitsmike deleted the mike/chatd-stream-silence-timeout branch August 21, 2026 08:15
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 21, 2026
An error occurred while trying to automatically change base from mike/chatd-mcp-observability to main August 27, 2026 08:22
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.

1 participant