Skip to content

opentui: fatal: Anchor does not exist #7061

Closed

Description

@ethaneng

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

Image

https://opncd.ai/share/431vj4lH

Operating System

macOS 15.6.1 (24G90)

Terminal

WezTerm + TMUX

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Jan 6, 2026
  2. ethaneng commented on Jan 6, 2026

    @ethaneng
    Author

    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.

  3. kommander commented on Jan 6, 2026

    @kommander
    Contributor

    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.

  4. Adictya commented on Jan 6, 2026

    @Adictya
    Contributor

    Hmm yeah, I remember we solved it by reordering some stuff... Will take this up and take a look

  5. Adictya commented on Jan 12, 2026

    @Adictya
    Contributor

    [Reconciler] Inserting node: item-3 into parent: container with anchor: item-3 false

    Have 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

  6. Adictya commented on Jan 19, 2026

    @Adictya
    Contributor

    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.

  7. github-actions commented on Mar 26, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingopentuiThis relates to changes in v1.0, now that opencode uses opentui

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions