You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] Frontend crash : tapClientLookup Index out of bounds when tool returns unexpected data #44562
工具返回非预期数据结构时,前端抛出 tapClientLookup: Index X out of bounds (length: N) 错误,React 触发 error-boundary。表现为聊天界面白屏、消息渲染失败或界面卡死。
Affected Component
CLI (interactive chat)
Messaging Platform (if gateway-related)
No response
Debug Report
OS: Windows 10
Hermes Desktop Version: 检查设置里的版本号
Browser: 内置 Chromium (Electron)
Model Provider: custom (agnes-2.0-flash)
Logs: C:\Users\Administrator\AppData\Local\hermes\logs\desktop.log
Operating System
Windows 11
Python Version
No response
Hermes Version
No response
Additional Logs / Traceback (optional)
错误发生在 index-CFGMLHc8.js:801:11970 的 Nqt 函数中
错误发生在 UserMessage React 组件渲染时
触发频率:在多次工具调用失败后容易出现(日志中观察到 6 次)
环境:Windows 10, Hermes Desktop GUI
日志文件位置:C:\Users\Administrator\AppData\Local\hermes\logs\desktop.log
[hermes] [renderer console] Error: tapClientLookup: Index 67 out of bounds (length: 17) [hermes] [renderer console] [error-boundary:root] Error: tapClientLookup: Index 67 out of bounds (length: 17) at Nqt (file:///.../index-CFGMLHc8.js:801:11970) at UserMessage () at oEe (file:///.../index-CFGMLHc8.js:70:56089) at Ok (file:///.../index-CFGMLHc8.js:68:26113)
Your dump shows build 0.16.0 (2026.6.5) [c94e93a6] (main @ 2026-06-11T07:25Z, bundle index-CFGMLHc8.js), which predates the fix.
Fix: PR #44493 (merged 2026-06-11T22:52Z, commit d221e36) adds a MessageRenderBoundary around each message in apps/desktop/src/components/assistant-ui/thread-virtualizer.tsx. It swallows this specific transient throw and recovers on the next consistent snapshot instead of unwinding to the root boundary, so the app no longer goes blank.
One correction on the trigger: the error isn't caused by tools "returning unexpected data structures". tapClientLookup is internal to the @assistant-ui/store dependency — it throws (instead of returning undefined) when a still-subscribed component reads a stale index against a replaced, shorter message/parts list (upstream: assistant-ui/assistant-ui#4051, assistant-ui/assistant-ui#3652). Bursts of failing tool calls just mutate the message list fast enough to hit that race; the tool output content is irrelevant.
What to do: update to a Hermes Desktop build at or after commit d221e369 (any build from main after 2026-06-11T22:52Z).
Recommend closing this as a duplicate of #41693 / fixed by #44493.
The error is Index 67 out of bounds (length: 17). Index 67 lines up with the pre-compression history size; length 17 is post-compression. My guess is the frontend's tool-call index cache doesn't reset when auto-compression fires, so the next render tries to dereference a position that no longer exists.
Quick way to confirm: reproduce in a session that triggers compression, then call a tool immediately after. If the crash only happens post-compression, that's the culprit — not the specific tools (skill_manage, memory, etc.).
Duplicate of #45403 (the open canonical issue for this tapClientLookup: Index N out of bounds desktop crash — same @assistant-ui/store index race). The crash is real and was verified in this thread, and the fix has already landed on main via #44493 / salvage #52704 (which closes the earlier #41693). Tracking the fix on #45403.
Three PRs address the stale assistant-ui lookup race behind #44562 or its root-boundary fallout: #41787 adds unbounded root recovery, #52704 adds bounded root recovery, and #64310 restores and updates that bounded recovery after its removal from main. The contributor evidence identifies #44562 as a duplicate of the broader crash tracked in #45403 rather than a malformed tool-result bug.
#41787 and #52704 implement substantially the same root-boundary mitigation, with #52704 superseding #41787 by bounding retries; #64310 is the current restoration and extension of the #52704 implementation after its removal from main.
Suggested consolidation
Keep #64310 open with a salvage path: retain its restored bounded root-only recovery, current-and-legacy lookup matcher, StrictMode handling, and focused regression coverage. Treat merged #52704 as the best existing fix and reference implementation, keep closed #41787 as superseded by #52704, and consolidate #44562 under canonical race issue #45403 while #64308 tracks the removal regression.
Complex graph
flowchart LR
classDef open fill:#dbeafe,stroke:#1d4ed8,color:#1e3a8a
classDef merged fill:#dcfce7,stroke:#15803d,color:#14532d
classDef closed fill:#e5e7eb,stroke:#6b7280,color:#1f2937
classDef unverified fill:#f3f4f6,stroke:#9ca3af,color:#374151
classDef best stroke-width:3px,stroke:#b45309
classDef target stroke-width:3px,stroke:#4338ca
I41693(["issue #41693 (closed)"])
I44562(["issue #44562 (open)"])
I64308(["issue #64308 (open)"])
subgraph Dup41787 ["PRs duplicating each other"]
P41787["PR #41787 (closed)"]
P52704["PR #52704 (merged)"]
P64310["PR #64310 (open)"]
end
P41787 -.->|partial| I44562
P52704 -->|best fix| I44562
P64310 -->|fixes| I44562
P41787 -.->|partial| I41693
P52704 -->|best fix| I41693
P64310 -->|fixes| I41693
P41787 -.->|partial| I64308
P52704 -->|fixes| I64308
P64310 -->|best fix| I64308
class I41693 closed
class I44562 open
class I64308 open
class I44562 target
class P41787 closed
class P52704 merged
class P64310 open
class P52704 best
class P52704 best
class P64310 best
click I41693 "https://github.com/NousResearch/hermes-agent/issues/41693"
click I44562 "https://github.com/NousResearch/hermes-agent/issues/44562"
click I64308 "https://github.com/NousResearch/hermes-agent/issues/64308"
click P41787 "https://github.com/NousResearch/hermes-agent/pull/41787"
click P52704 "https://github.com/NousResearch/hermes-agent/pull/52704"
click P64310 "https://github.com/NousResearch/hermes-agent/pull/64310"
Loading
Graph: solid arrow = fixes / best fix, dashed arrow = partial or unverified (see edge label); boxed group = PRs duplicating each other; amber border = best fix; indigo border = target; gray node = closed (state tag in the node label).
Cross-PR triage: Reviewed 3 pull requests and 3 issues in this complex. Each diff was read against this issue; Assessment working set: 28 kB of PR diffs, 26 kB of issue/PR text, 16 kB of discussion (14 comments), 14 verify verdicts. verdicts reflect diff content, not PR titles. Part of an automated triage batch.
Closing as duplicate of #45403, which stays open as the canonical tracker for the @assistant-ui lookup-race class. The message-render and root/contrib boundary recoveries are on main via c4ba4770eb (#52704) and df7e1784c7 (#81232, @OutThisLife); remaining variants are tracked in #45403.
Activity
Huangwenboiiii commentedon Jun 12, 2026
report:https://dpaste.com/4GX58QAAG
agent.log:https://paste.rs/bptCa
gateway.log:https://paste.rs/b6KHj
desktop.log:https://paste.rs/ACMCQ
AIalliAI commentedon Jun 12, 2026
Verified — the crash is real, but this is a duplicate of #41693, and the fix already landed on main a couple of hours before this issue was filed.
Verification against your logs:
desktop.log(paste.rs/ACMCQ) shows 22tapClientLookup: Index N out of boundsrenderer errors, all escalating to[error-boundary:root]and blanking the window — same signature as [Bug]: Hermes Desktop renderer crashes with "tapClientLookup: Index N out of bounds" → root error-boundary forces "Reload window" #41693.0.16.0 (2026.6.5) [c94e93a6](main @ 2026-06-11T07:25Z, bundleindex-CFGMLHc8.js), which predates the fix.Fix: PR #44493 (merged 2026-06-11T22:52Z, commit d221e36) adds a
MessageRenderBoundaryaround each message inapps/desktop/src/components/assistant-ui/thread-virtualizer.tsx. It swallows this specific transient throw and recovers on the next consistent snapshot instead of unwinding to the root boundary, so the app no longer goes blank.One correction on the trigger: the error isn't caused by tools "returning unexpected data structures".
tapClientLookupis internal to the@assistant-ui/storedependency — it throws (instead of returningundefined) when a still-subscribed component reads a stale index against a replaced, shorter message/parts list (upstream: assistant-ui/assistant-ui#4051, assistant-ui/assistant-ui#3652). Bursts of failing tool calls just mutate the message list fast enough to hit that race; the tool output content is irrelevant.What to do: update to a Hermes Desktop build at or after commit
d221e369(any build from main after 2026-06-11T22:52Z).Recommend closing this as a duplicate of #41693 / fixed by #44493.
tamio0800 commentedon Jun 12, 2026
Looking at the logs you shared — there's a compression event right before the crash:
The error is
Index 67 out of bounds (length: 17). Index 67 lines up with the pre-compression history size; length 17 is post-compression. My guess is the frontend's tool-call index cache doesn't reset when auto-compression fires, so the next render tries to dereference a position that no longer exists.Quick way to confirm: reproduce in a session that triggers compression, then call a tool immediately after. If the crash only happens post-compression, that's the culprit — not the specific tools (
skill_manage,memory, etc.).alt-glitch commentedon Jun 27, 2026
Duplicate of #45403 (the open canonical issue for this
tapClientLookup: Index N out of boundsdesktop crash — same @assistant-ui/store index race). The crash is real and was verified in this thread, and the fix has already landed on main via #44493 / salvage #52704 (which closes the earlier #41693). Tracking the fix on #45403.mrZhangTianye commentedon Jul 4, 2026
I’m hitting the same issue on macOS. Simple chat works, but any terminal/skill/tool invocation hangs or breaks the desktop UI.
Observed logs:
Repro:
This looks related to #44562 and #45403. Is PR #58110 expected to fix this, and is there a released build containing it?
GottZ commentedon Aug 3, 2026
Summary
Three PRs address the stale assistant-ui lookup race behind #44562 or its root-boundary fallout: #41787 adds unbounded root recovery, #52704 adds bounded root recovery, and #64310 restores and updates that bounded recovery after its removal from main. The contributor evidence identifies #44562 as a duplicate of the broader crash tracked in #45403 rather than a malformed tool-result bug.
Related pull requests
partial— (+148/-0) — partial_fix: Adds root-only next-tick recovery for three transient renderer errors with a stale-index regression test, mitigating the latched reload screen without fixing the underlying race; it remains relevant as the original approach but was closed as superseded by bounded salvage fix(desktop): recover root error boundary from transient render races (salvage #41787) #52704.best fix— (+183/-0) — fixes: Builds on fix(desktop): recover root boundary from transient render races #41787 with root-only recovery capped at three attempts per five-second window and tests transient, persistent, scoped, and unrelated failures; it is the best existing fix and remains the merged reference implementation, although its recovery code was later removed from main by 3444158.fixes— (+302/-5) — fixes: Restores bounded root recovery, covers the current useClientLookup name plus legacy tapClientLookup/tapClientResource variants, and handles StrictMode timer ownership while preserving fallback behavior for persistent or unrelated errors. This matches the maintainer-bot keep_open verdict and provides the high-salvageability path for the regression documented in [Bug]: Desktop root tapClientLookup recovery was removed from main #64308.Duplicates
#41787 and #52704 implement substantially the same root-boundary mitigation, with #52704 superseding #41787 by bounding retries; #64310 is the current restoration and extension of the #52704 implementation after its removal from main.
Suggested consolidation
Keep #64310 open with a salvage path: retain its restored bounded root-only recovery, current-and-legacy lookup matcher, StrictMode handling, and focused regression coverage. Treat merged #52704 as the best existing fix and reference implementation, keep closed #41787 as superseded by #52704, and consolidate #44562 under canonical race issue #45403 while #64308 tracks the removal regression.
Complex graph
flowchart LR classDef open fill:#dbeafe,stroke:#1d4ed8,color:#1e3a8a classDef merged fill:#dcfce7,stroke:#15803d,color:#14532d classDef closed fill:#e5e7eb,stroke:#6b7280,color:#1f2937 classDef unverified fill:#f3f4f6,stroke:#9ca3af,color:#374151 classDef best stroke-width:3px,stroke:#b45309 classDef target stroke-width:3px,stroke:#4338ca I41693(["issue #41693 (closed)"]) I44562(["issue #44562 (open)"]) I64308(["issue #64308 (open)"]) subgraph Dup41787 ["PRs duplicating each other"] P41787["PR #41787 (closed)"] P52704["PR #52704 (merged)"] P64310["PR #64310 (open)"] end P41787 -.->|partial| I44562 P52704 -->|best fix| I44562 P64310 -->|fixes| I44562 P41787 -.->|partial| I41693 P52704 -->|best fix| I41693 P64310 -->|fixes| I41693 P41787 -.->|partial| I64308 P52704 -->|fixes| I64308 P64310 -->|best fix| I64308 class I41693 closed class I44562 open class I64308 open class I44562 target class P41787 closed class P52704 merged class P64310 open class P52704 best class P52704 best class P64310 best click I41693 "https://github.com/NousResearch/hermes-agent/issues/41693" click I44562 "https://github.com/NousResearch/hermes-agent/issues/44562" click I64308 "https://github.com/NousResearch/hermes-agent/issues/64308" click P41787 "https://github.com/NousResearch/hermes-agent/pull/41787" click P52704 "https://github.com/NousResearch/hermes-agent/pull/52704" click P64310 "https://github.com/NousResearch/hermes-agent/pull/64310"Graph: solid arrow = fixes / best fix, dashed arrow = partial or unverified (see edge label); boxed group = PRs duplicating each other; amber border = best fix; indigo border = target; gray node = closed (state tag in the node label).
Cross-PR triage: Reviewed 3 pull requests and 3 issues in this complex. Each diff was read against this issue; Assessment working set: 28 kB of PR diffs, 26 kB of issue/PR text, 16 kB of discussion (14 comments), 14 verify verdicts. verdicts reflect diff content, not PR titles. Part of an automated triage batch.
teknium1 commentedon Sep 14, 2026
Closing as duplicate of #45403, which stays open as the canonical tracker for the @assistant-ui lookup-race class. The message-render and root/contrib boundary recoveries are on main via
c4ba4770eb(#52704) anddf7e1784c7(#81232, @OutThisLife); remaining variants are tracked in #45403.