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] "tapClientLookup: Index 1 out of bounds (length: 0)" & "MessagePartText can only be used inside text or reasoning message parts" & "Duplicate key toolCallId" #10288
Issue 1. Sometimes randomly when clicking "New chat" the program just crashes with the message tapClientLookup: Index 1 out of bounds (length: 0) and needs to be restarted.
Issue 2. When I started a generation in a project and I clicked on a previous chat from the sidebar, the program crashed with the message: MessagePartText can only be used inside text or reasoning message parts.
Issue 3. Randomly just got "Duplicate key toolCallId-w6z0JOve4MSAloqXmo4iSGABmSSVkQTC:0acbb2e2-955a-4b9a-9b45-92ac44e2b9be:142 in tapResources" when not doing anything.
Environment
Where are you using Unsloth?
Unsloth desktop application
Unsloth web UI (unsloth studio)
Unsloth CLI
Python package or notebook
Colab or Kaggle
Operating system and version:
Latest CachyOS Desktop
GPU model(s) and accelerator backend:
NVIDIA CUDA
Unsloth Version
v0.1.806-beta Package Version
2026.9.2 Desktop App Version
0.1.806-beta llama.cpp Version
b10715-mix-86bd2d3
What happened?
Issue 1. Not exactly sure how to reproduce, it just randomly happens when clicking "New chat".
Issue 2. I started a generation in a project and then I clicked on a previous chat and then it crashed.
Diagnostics and logs
I searched all the files and could not find any relevant files that mention the errors. Even tauri.log does not include lines from the time the errors happened.
Neither error string lives in Unsloth’s source. They come from @assistant-ui:
tapClientLookup: Index 1 out of bounds (length: 0) — empty new thread while a message leaf from the previous thread is still mounted (assistant-ui#5948)
MessagePartText can only be used inside text or reasoning message parts. — same thread-switch race, part-type / index mismatch (assistant-ui#5118)
Studio currently pins @assistant-ui/[email protected] (with @assistant-ui/[email protected]). Upstream fixes for these races landed later (~0.14.28 for the MessagePartText case; empty-list New-chat needs the newer store / ~0.15.x line).
Why Studio hits this often:
New chat → switchToNewThread() installs an empty message list — classic #5948 window.
Switching chats mid-generation keeps the runtime alive on purpose (stream keepalive) instead of remounting — that rebinds the UI to another thread’s store while old message parts are still subscribed, which is exactly the race upstream describes.
So this isn’t a wrong Unsloth MessagePartText wiring; it’s a vulnerable dependency pin plus our keepalive / thread-switch design exercising a known library race. Throws happen inside useSyncExternalStore’s snapshot read, so a normal React error boundary around the markdown leaf usually won’t contain them — the whole app tears down, which matches “needs restart” and empty tauri.log.
Suggested path
Short term: treat as known @assistant-ui thread-switch race on the current pin; workaround is avoid rapid New chat / mid-run switches when possible.
Real fix: plan an @assistant-ui/* upgrade (breaking), or an interim patch-package on the store / part hooks if upgrade has to wait.
Happy to help with the upgrade/patch PR once maintainers pick a direction. @danielhanchen
changed the title [-][Bug] tapClientLookup: Index 1 out of bounds (length: 0) & MessagePartText can only be used inside text or reasoning message parts.[/-][+][Bug] "tapClientLookup: Index 1 out of bounds (length: 0)" & "MessagePartText can only be used inside text or reasoning message parts"[/+]on Sep 12, 2026
changed the title [-][Bug] "tapClientLookup: Index 1 out of bounds (length: 0)" & "MessagePartText can only be used inside text or reasoning message parts"[/-][+][Bug] "tapClientLookup: Index 1 out of bounds (length: 0)" & "MessagePartText can only be used inside text or reasoning message parts" & "Duplicate key toolCallId"[/+]on Sep 30, 2026
Fixed! Sorry on the delay. Switching chats while a reply was still generating (most often from a project page) could leave a message from the old chat looking itself up in the new, still-empty chat, which crashed the app with tapClientLookup: Index 1 out of bounds or MessagePartText can only be used inside text or reasoning message parts. That is fixed in #13352, and the Duplicate key toolCallId crash was fixed earlier in #12442.
To update: Unsloth Desktop will have an update banner. For Studio, use unsloth studio update. For Docker, use docker exec <container> unsloth-studio-update. Reopen if it still happens.
12. Fixed! Sorry on the delay. Switching chats while a reply was still generating (most often from a project page) could leave a message from the old chat looking itself up in the new, still-empty chat, which crashed the app with tapClientLookup: Index 1 out of bounds or MessagePartText can only be used inside text or reasoning message parts. That is fixed in #13352, and the Duplicate key toolCallId crash was fixed earlier in #12442.
To update: Unsloth Desktop will have an update banner. For Studio, use unsloth studio update. For Docker, use docker exec <container> unsloth-studio-update. Reopen if it still happens.
Activity
modelpath-dev commentedon Sep 4, 2026
I'll work on this. Could you assign it to me?
I'll reproduce from the report, fix the failure path, and add a test so it stays fixed.
indrajeetapache commentedon Sep 4, 2026
Neither error string lives in Unsloth’s source. They come from @assistant-ui:
tapClientLookup: Index 1 out of bounds (length: 0) — empty new thread while a message leaf from the previous thread is still mounted (assistant-ui#5948)
MessagePartText can only be used inside text or reasoning message parts. — same thread-switch race, part-type / index mismatch (assistant-ui#5118)
Studio currently pins @assistant-ui/[email protected] (with @assistant-ui/[email protected]). Upstream fixes for these races landed later (~0.14.28 for the MessagePartText case; empty-list New-chat needs the newer store / ~0.15.x line).
Why Studio hits this often:
New chat → switchToNewThread() installs an empty message list — classic #5948 window.
Switching chats mid-generation keeps the runtime alive on purpose (stream keepalive) instead of remounting — that rebinds the UI to another thread’s store while old message parts are still subscribed, which is exactly the race upstream describes.
So this isn’t a wrong Unsloth MessagePartText wiring; it’s a vulnerable dependency pin plus our keepalive / thread-switch design exercising a known library race. Throws happen inside useSyncExternalStore’s snapshot read, so a normal React error boundary around the markdown leaf usually won’t contain them — the whole app tears down, which matches “needs restart” and empty tauri.log.
Suggested path
Short term: treat as known @assistant-ui thread-switch race on the current pin; workaround is avoid rapid New chat / mid-run switches when possible.
Real fix: plan an @assistant-ui/* upgrade (breaking), or an interim patch-package on the store / part hooks if upgrade has to wait.
Happy to help with the upgrade/patch PR once maintainers pick a direction. @danielhanchen
[-][Bug] tapClientLookup: Index 1 out of bounds (length: 0) & MessagePartText can only be used inside text or reasoning message parts.[/-][+][Bug] "tapClientLookup: Index 1 out of bounds (length: 0)" & "MessagePartText can only be used inside text or reasoning message parts"[/+]frostyautumnleaf commentedon Sep 30, 2026
Got a new one:
[-][Bug] "tapClientLookup: Index 1 out of bounds (length: 0)" & "MessagePartText can only be used inside text or reasoning message parts"[/-][+][Bug] "tapClientLookup: Index 1 out of bounds (length: 0)" & "MessagePartText can only be used inside text or reasoning message parts" & "Duplicate key toolCallId"[/+]danielhanchen commentedon Oct 12, 2026
Fixed! Sorry on the delay. Switching chats while a reply was still generating (most often from a project page) could leave a message from the old chat looking itself up in the new, still-empty chat, which crashed the app with
tapClientLookup: Index 1 out of boundsorMessagePartText can only be used inside text or reasoning message parts. That is fixed in #13352, and theDuplicate key toolCallIdcrash was fixed earlier in #12442.To update: Unsloth Desktop will have an update banner. For Studio, use
unsloth studio update. For Docker, usedocker exec <container> unsloth-studio-update. Reopen if it still happens.frostyautumnleaf commentedon Oct 12, 2026
Thank you!