Discord: separate inbound worker timeout from listener timeout#36602
Merged
osolmaz merged 1 commit intoopenclaw:mainfrom Mar 5, 2026
Merged
Discord: separate inbound worker timeout from listener timeout#36602osolmaz merged 1 commit intoopenclaw:mainfrom
osolmaz merged 1 commit intoopenclaw:mainfrom
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
channels.discord.eventQueue.listenerTimeoutas the timeout for queued agent turnschannels.discord.inboundWorker.runTimeoutMsconfig and document the new timeout splitdocs/experiments/plans/discord-async-inbound-worker.mdWhy
The current Discord path used the Carbon listener timeout as the timeout for queued background runs in
message-handler.ts.That meant a healthy queued run could be aborted just because it outlived the gateway listener budget. The failing repro test in this PR captured that mismatch.
This change separates those concerns:
eventQueue.listenerTimeoutnow remains the gateway listener budget for normalization and enqueue workChanges
src/discord/monitor/inbound-job.tssrc/discord/monitor/inbound-worker.tsrunTimeoutMs: 0disables itsrc/discord/monitor/message-handler.tssrc/discord/monitor/provider.tseventQueue.listenerTimeoutinto the message handler as a run timeoutdiscord.inboundWorker.runTimeoutMsexplicitly insteadchannels.discord.inboundWorker.runTimeoutMschannels.discord.eventQueue.listenerTimeoutis only the listener budgetVerification
pnpm vitest src/discord/monitor/message-handler.queue.test.ts src/discord/monitor/provider.test.tspnpm tsgopnpm build