Repository navigation
Closed
Labels
bugSomething isn't workingSomething isn't workingopentuiThis relates to changes in v1.0, now that opencode uses opentuiThis relates to changes in v1.0, now that opencode uses opentui
Description
Description
Error: Anchor does not exist
at insertBefore (../../node_modules/.bun/@[email protected]+81ecd8642a1892ca/node_modules/@opentui/core/index-zj0wwh9d.js:13487:17)
at _insertNode (../../node_modules/.bun/@[email protected]+897ebc1644d3edd0/node_modules/@opentui/solid/index.js:461:10)
at replaceNode (../../node_modules/.bun/@[email protected]+897ebc1644d3edd0/node_modules/@opentui/solid/index.js:331:5)
at reconcileArrays (../../node_modules/.bun/@[email protected]+897ebc1644d3edd0/node_modules/@opentui/solid/index.js:292:15)
at insertExpression (../../node_modules/.bun/@[email protected]+897ebc1644d3edd0/node_modules/@opentui/solid/index.js:199:13)
at <anonymous> (../../node_modules/.bun/@[email protected]+897ebc1644d3edd0/node_modules/@opentui/solid/index.js:187:44)
at runComputation (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:742:22)
at updateComputation (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:724:3)
at createRenderEffect (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:240:75)
at insertExpression (../../node_modules/.bun/@[email protected]+897ebc1644d3edd0/node_modules/@opentui/solid/index.js:187:9)...
The above error occurred to me after sending my first message in a session that was previously paused due to my Claude Pro subscription usage running out.
When clicking restart, and trying to send another message, it begins trying to read a few files then fails with the same error a few seconds later.
Not sure how helpful this ticket will be alone, though I was encouraged to report and hence did :).
Plugins
None
OpenCode version
1.0.220
Steps to reproduce
No response
Screenshot and/or share link
https://opncd.ai/share/431vj4lH
Operating System
macOS 15.6.1 (24G90)
Terminal
WezTerm + TMUX
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingopentuiThis relates to changes in v1.0, now that opencode uses opentuiThis relates to changes in v1.0, now that opencode uses opentui
Activity
ethaneng commentedon Jan 6, 2026
I tried /compact -ing the session and trying again with no luck. I suspect this might be an issue with nesting opencode within a TMUX split (not shown in the screenshot sorry). Once I tried re-opening the session in my terminal outside of TMUX it seemed to start working again - though not sure if just coincidental.
kommander commentedon Jan 6, 2026
Looks like a race condition in the reconciler. @Adictya do you have an idea when this could happen? It seems like the ref is already destroyed when trying to use it as anchor or the ref that's being added is stale. I saw some issues with stale refs before. Not sure how to handle that.
Adictya commentedon Jan 6, 2026
Hmm yeah, I remember we solved it by reordering some stuff... Will take this up and take a look
Adictya commentedon Jan 12, 2026
[Reconciler] Inserting node: item-3 into parent: container with anchor: item-3 falseHave found one potential cause of the reconciler using the element itself as an anchor. And if its removed then that could have led to this error.
Working on the fix and exploring more edge cases around this
Adictya commentedon Jan 19, 2026
Have made this edge case non fatal in anomalyco/opentui#552 and fixed the self anchor bug
This particular error represents a case where a non-destroyed but also non-sibling node is passed as an anchor. Solid uses getNextSibling() to determine the anchor hence it couldn't have been from the solid reconciler layer, either its in one of the internal openTui components or in some direct api call but can't make a full fix at the moment without a reliable reproduction strategy still the pr mentioned should atleast fix the crash.
github-actions commentedon Mar 26, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.