fix: extend realtime OpenClaw consult wait#607
Merged
Conversation
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 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
chat.history, preferring the assistant row matching the OpenClaw run id/idempotency key, then falling back to the consult prompt.Investigation
OpenClaw docs describe
talk.client.toolCallas the browser realtime path foropenclaw_agent_consult: clients receive a run id, wait for normal chat lifecycle events, then submit the provider-specific tool result. The Control UI docs also distinguish livechatdelivery events from durablechat.history, and say history is reloaded after tool-final events.CrewCMD's relay route followed the event-wait pattern, but it added a hard 110 second timeout and returned
OpenClaw completed without returning text.when the final event had no text. That explains both failure modes reported here: long OpenClaw runs crossed CrewCMD's local timer, and final events without inline text were not recovered from the durable transcript.Verification
pnpm vitest run 'src/app/api/runtimes/[id]/talk/realtime/relay/route.test.ts'pnpm typecheckpnpm exec eslint 'src/app/api/runtimes/[id]/talk/realtime/relay/route.ts' 'src/app/api/runtimes/[id]/talk/realtime/relay/route.test.ts'git diff --checkpnpm typecheck && pnpm buildpassed. Build emitted existing Turbopack NFT warnings aroundnext.config.ts/openclaw-config-parser.ts.Risk
Medium. This keeps an HTTP tool-call request open longer, matching the current synchronous relay architecture. A follow-up background consult handoff would be better for truly unbounded OpenClaw runs.