fix(agent): emit assistant events for webchat message content#27
Closed
Nachx639 wants to merge 2 commits intoopenclaw:mainfrom
Closed
fix(agent): emit assistant events for webchat message content#27Nachx639 wants to merge 2 commits intoopenclaw:mainfrom
Nachx639 wants to merge 2 commits intoopenclaw:mainfrom
Conversation
The webchat was receiving empty messages because agentCommand didn't pass the onAgentEvent callback to runCommandReply. This caused assistant text events to never be emitted, resulting in the gateway broadcasting chat events with no message content. This fix passes onAgentEvent to runCommandReply so that assistant stream events are properly emitted and the webchat receives the actual response text. 🤖 Generated with [Claude Code](https://claude.ai/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
The webchat sends an idempotencyKey with chat.send requests and expects
events to arrive with that same runId. Previously, the gateway was using
the internal sessionId as runId, causing a mismatch that prevented the
webchat from correlating responses with pending requests.
Changes:
- chatRunSessions now stores {sessionKey, clientRunId} instead of just sessionKey
- Chat events use clientRunId so webchat can match them to pending promises
- Response payload includes the original clientRunId from idempotencyKey
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
520bd0a to
ead932f
Compare
Contributor
|
Appreciate the fix! I went all choa-monkey on this while working on 2.0, so this was fixed without reviewing the PR in time. |
dgarson
referenced
this pull request
in dgarson/clawdbot
Feb 2, 2026
feat(ui): add category filtering to command palette
alexprime1889-prog
pushed a commit
to alexprime1889-prog/moltbot
that referenced
this pull request
Feb 8, 2026
centminmod
added a commit
to centminmod/clawdbot
that referenced
this pull request
Feb 9, 2026
…, Attack openclaw#27, Threat #7, Hardening #12)
frodo-harborbot
pushed a commit
to harborworks/openclaw
that referenced
this pull request
Feb 16, 2026
Navbar, admin panel, and CRUD for users/orgs/members/harbors
songliu0403-rgb
pushed a commit
to songliu0403-rgb/openclaw
that referenced
this pull request
Feb 26, 2026
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
ddupg
pushed a commit
to ddupg/openclaw
that referenced
this pull request
Feb 27, 2026
- 支持根据 bindings 配置将不同用户/群聊分发到不同 Agent - 优化权限缺失时的错误提示,降低配置排障门槛 - 保留原有 accountId 默认值和流式卡片标题逻辑 Co-authored-by: wsbjj <94124135+wsbjj@users.noreply.github.com>
ddupg
pushed a commit
to ddupg/openclaw
that referenced
this pull request
Feb 27, 2026
let5sne
pushed a commit
to let5sne/openclaw
that referenced
this pull request
Mar 1, 2026
Memory files (MEMORY.md, memory/*.md) are the most trusted context source for agents, yet had no injection detection. External content (webhooks, emails) already uses detectSuspiciousPatterns() — this extends the same protection to memory files. Change: in manager-sync-ops.ts, call detectSuspiciousPatterns() on file content before indexFile() for memory-source files. Logs a warn with path + pattern count if suspicious content is found. Non-blocking. Fixes improvement item openclaw#27 from openclaw-improvement-ideas.md.
18 tasks
benieralexis-sudo
pushed a commit
to benieralexis-sudo/openclaw
that referenced
this pull request
Mar 6, 2026
- openclaw#6 Reply classifier hallucination pattern: regex plus specifique (exige prenom+nom) - openclaw#7 Fuzzy match domaine: ajoute verification local part + nom similaire - openclaw#9 callOpenAI duplique: delegue au shared-nlp (tracking budget) - openclaw#22 Collision cron 14h: mini-cycles decales 10h/12h/15h/17h - openclaw#24 Bounce rate dilue: remplace derniere entree success par bounce - openclaw#26 API chat+HITL sans auth: verification x-api-token/authorization - openclaw#27 Passwords dashboard: generes aleatoirement (24 chars) - Bonus: commande "statut systeme" protegee admin-only 28/28 bugs de l'audit corriges. 0 restant. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
elliot-ylambda
pushed a commit
to elliot-ylambda/magister-openclaw
that referenced
this pull request
Mar 7, 2026
Release: OG image and social meta tags
ronan-dandelion-cult
pushed a commit
to karmaterminal/openclaw
that referenced
this pull request
Mar 7, 2026
- Appendix: Integration Test Evidence section with Swim 7 scorecard - Evidence locations table (silas-likes-to-watch PR openclaw#27, gateway logs, canary tag) - Methodology note: 4-agent test topology, blind enrichment findings - Key finding: silent enrichment indistinguishable from training knowledge - Scrub verified: zero prince names/hostnames/IPs in main RFC body - Changelog section (marked for removal) contains internal refs as expected
cael-dandelion-cult
added a commit
to karmaterminal/openclaw
that referenced
this pull request
Mar 7, 2026
Structured scorecard: 10 pass, 2 deferred, 0 regressions. Key evidence lines from raw gateway log. Enrichment trust boundary findings. Evidence archive links to karmaterminal/silas-likes-to-watch PR openclaw#27.
ronan-dandelion-cult
pushed a commit
to karmaterminal/openclaw
that referenced
this pull request
Mar 7, 2026
- Gateway log excerpts for each Swim 7 test (tolerance, width, chain, enrichment) - Each excerpt shows the guard/lifecycle event firing with timestamps - Matches evidence in silas-likes-to-watch PR openclaw#27 raw logs
lucasmpramos
added a commit
to butley/openclaw
that referenced
this pull request
Mar 9, 2026
…ron Filter - README.md: 24→26 active patches, added entries for both - verify-patches.sh: added checks (26/26 passing)
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
onAgentEventcallback torunCommandReplyinagentCommandProblem
The webchat was showing "chat timed out" or empty responses because:
agentCommandcallsrunCommandReplybut didn't pass theonAgentEventcallbackstream: "assistant") were never emittedchatRunBuffersand includes it in thechatevent withstate: "final"messagewasundefinedSolution
Pass
onAgentEventtorunCommandReplyso that assistant stream events are properly emitted:Test plan
🤖 Generated with Claude Code