Skip to content

opentui: fatal: TextNodeRenderable only accepts strings, TextNodeRenderable instances, or StyledText instances #5561

Closed

Description

@denis-vilantis

Description

Error: TextNodeRenderable only accepts strings, TextNodeRenderable instances, or StyledText instances
    at add (/nix/store/qh5663if2bihwa8d9j3365wb4rqw97c4-opencode-1.0.138/lib/opencode/dist/index.js:189562:20)
    at _insertNode (/nix/store/qh5663if2bihwa8d9j3365wb4rqw97c4-opencode-1.0.138/lib/opencode/dist/index.js:196726:15)
    at appendNodes (/nix/store/qh5663if2bihwa8d9j3365wb4rqw97c4-opencode-1.0.138/lib/opencode/dist/index.js:196609:17)
    at insertExpression (/nix/store/qh5663if2bihwa8d9j3365wb4rqw97c4-opencode-1.0.138/lib/opencode/dist/index.js:196478:24)
    at runComputation (/nix/store/qh5663if2bihwa8d9j3365wb4rqw97c4-opencode-1.0.138/lib/opencode/dist/index.js:195643:24)
    at updateComputation (/nix/store/qh5663if2bihwa8d9j3365wb4rqw97c4-opencode-1.0.138/lib/opencode/dist/index.js:195626:17)
    at createRenderEffect (/nix/store/qh5663if2bihwa8d9j3365wb4rqw97c4-opencode-1.0.138/lib/opencode/dist/index.js:195225:22)
    at insert (/nix/store/qh5663if2bihwa8d9j3365wb4rqw97c4-opencode-1.0.138/lib/opencode/dist/index.js:196429:23)
    at children (/nix/store/qh5663if2bihwa8d9j3365wb4rqw97c4-opencode-1.0.138/lib/opencode/dist/index.js:216073:15)
    at <anonymous> (/nix/store/qh5663if2bihwa8d9j3365wb4rqw97c4-opencode-1.0.138/lib/opencode/dist/index.js:196299:26)
    at runComputation (/nix/store/qh5663if2bihwa8d9j3365wb4rqw97c4-opencode-1.0.138/lib/opencode/dist/index.js:195643:24)
    at updateComputation (/nix/store/qh5663if2bihwa8d9j3365wb4rqw97c4-opencode-1.0.138/lib/opencode/dist/index.js:195626:17)
    at createMemo (/nix/store/qh5663if2bihwa8d9j3365wb4rqw97c4-opencode-1.0.138/lib/opencode/dist/index.js:195246:22)
    at render (/nix/store/qh5663if2bihwa8d9j3365wb4rqw97c4-opencode-1.0.138/lib/opencode/dist/index.js:216066:25)
    at untrack (/nix/store/qh5663if2bihwa8d9j3365wb4rqw97c4-opencode-1.0.138/lib/opencode/dist/index.js:195418:15)
    at <anonymous> (/nix/store/qh5663if2bihwa8d9j3365wb4rqw97c4-opencode-1.0.138/lib/opencode/dist/index.js:215907:38)
    at runComputation (/nix/store/qh5663if2bihwa8d9j3365wb4rqw97c4-opencode-1.0.138/lib/opencode/dist/index.js:195643:24)
    at updateComputation (/nix/store/qh5663if2bihwa8d9j3365wb4rqw97c4-opencode-1.0.138/lib/opencode/dist/index.js:195626:17)
    at createMemo (/nix/store/qh5663if2bihwa8d9j3365wb4rqw97c4-opencode-1.0.138/lib/opencode/dist/index.js:195246:22)
    at ToolPart (/nix/store/qh5663if2bihwa8d9j3365wb4rqw97c4-opencode-1.0.138/lib/opencode/dist/index.js:215852:31)
    at untrack (/nix/store/qh5663if2bihwa8d9j3365wb4rqw97c4-opencode-1.0.138/lib/opencode/dist/index.js:195418:15)
    at <anonymous> (/nix/store/qh5663if2bihwa8d9j3365wb4rqw97c4-opencode-1.0.138/lib/opencode/dist/index.js:196299:26)
    at runComputation (/nix/store/qh5663if2bihwa8d9j3365wb4rqw97c4-opencode-1.0.138/lib/opencode/dist/index.js:195643:24)
    at updateComputation (/nix/store/qh5663if2bihwa8d9j3365wb4rqw97c4-opencode-1.0.138/lib/opencode/dist/index.js:195626:17)
    at createMemo (/nix/store/qh5663if2bihwa8d9j3365wb4rqw97c4-opencode-1.0.138/lib/opencode/dist/index.js:195246:22)
    at createRoot (/nix/store/qh5663if2bihwa8d9j3365wb4rqw97c4-opencode-1.0.138/lib/opencode/dist/index.js:195188:22)
    at <anonymous> (/nix/store/qh5663if2bihwa8d9j3365wb4rqw97c4-opencode-1.0.138/lib/opencode/dist/index.js:196049:34)
    at untrack (/nix/store/qh5663if2bihwa8d9j3365wb4rqw97c4-opencode-1.0.138/lib/opencode/dist/index.js:195418:15)
    at runComputation (/nix/store/qh5663if2bihwa8d9j3365wb4rqw97c4-opencode-1.0.138/lib/opencode/dist/index.js:195643:24)
    at updateComputation (/nix/store/qh5663if2bihwa8d9j3365wb4rqw97c4-opencode-1.0.138/lib/opencode/dist/index.js:195626:17)
    at createMemo (/nix/store/qh5663if2bihwa8d9j3365wb4rqw97c4-opencode-1.0.138/lib/opencode/dist/index.js:195246:22)
    at AssistantMessage (/nix/store/qh5663if2bihwa8d9j3365wb4rqw97c4-opencode-1.0.138/lib/opencode/dist/index.js:215644:27)
    at untrack (/nix/store/qh5663if2bihwa8d9j3365wb4rqw97c4-opencode-1.0.138/lib/opencode/dist/index.js:195418:15)
    at <anonymous> (/nix/store/qh5663if2bihwa8d9j3365wb4rqw97c4-opencode-1.0.138/lib/opencode/dist/index.js:196335:21)
    at runComputation (/nix/store/qh5663if2bihwa8d9j3365wb4rqw97c4-opencode-1.0.138/lib/opencode/dist/index.js:195643:24)
    at updateComputation (/nix/store/qh5663if2bihwa8d9j3365wb4rqw97c4-opencode-1.0.138/lib/opencode/dist/index.js:195626:17)
    at createMemo (/nix/store/qh5663if2bihwa8d9j3365wb4rqw97c4-opencode-1.0.138/lib/opencode/dist/index.js:195246:22)
    at createRoot (/nix/store/qh5663if2bihwa8d9j3365wb4rqw97c4-opencode-1.0.138/lib/opencode/dist/index.js:195188:22)
    at <anonymous> (/nix/store/qh5663if2bihwa8d9j3365wb4rqw97c4-opencode-1.0.138/lib/opencode/dist/index.js:196049:34)
    at untrack (/nix/store/qh5663if2bihwa8d9j3365wb4rqw97c4-opencode-1.0.138/lib/opencode/dist/index.js:195418:15)
    at runComputation (/nix/store/qh5663if2bihwa8d9j3365wb4rqw97c4-opencode-1.0.138/lib/opencode/dist/index.js:195643:24)
    at updateComputation (/nix/store/qh5663if2bihwa8d9j3365wb4rqw97c4-opencode-1.0.138/lib/opencode/dist/index.js:195626:17)
    at runTop (/nix/store/qh5663if2bihwa8d9j3365wb4rqw97c4-opencode-1.0.138/lib/opencode/dist/index.js:195746:24)
    at runQueue (/nix/store/qh5663if2bihwa8d9j3365wb4rqw97c4-opencode-1.0.138/lib/opencode/dist/index.js:195833:11)
    at completeUpdates (/nix/store/qh5663if2bihwa8d9j3365wb4rqw97c4-opencode-1.0.138/lib/opencode/dist/index.js:195782:15)
    at runUpdates (/nix/store/qh5663if2bihwa8d9j3365wb4rqw97c4-opencode-1.0.138/lib/opencode/dist/index.js:195768:20)
    at setStore (/nix/store/qh5663if2bihwa8d9j3365wb4rqw97c4-opencode-1.0.138/lib/opencode/dist/index.js:199244:10)
    at sync (/nix/store/qh5663if2bihwa8d9j3365wb4rqw97c4-opencode-1.0.138/lib/opencode/dist/i...

OpenCode version

1.0.138

Steps to reproduce

work on a problem in Plan mode with Qwen3 Coder. At some random point it crashes. Restarting the app and re-opening the same session leads to immediate crash, repeatedly.

Screenshot and/or share link

Image

Operating System

nixos unstable

Terminal

xterm-kitty

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Dec 15, 2025
  2. github-actions commented on Dec 15, 2025

    @github-actions
    Contributor

    This issue appears to be a duplicate of an existing issue. Please check:

    Both issues report the same error occurring in the opentui rendering layer. Feel free to ignore if your case has different symptoms or context.

  3. rekram1-node commented on Dec 15, 2025

    @rekram1-node
    Contributor

    Can you replicate this on latest?

  4. self-assigned this
    on Dec 15, 2025
  5. denis-vilantis commented on Dec 15, 2025

    @denis-vilantis
    Author

    Can you replicate this on latest?

    $ opencode --version
    1.0.153

    opening one of the crashing sessions:

    Image
  6. rekram1-node commented on Dec 15, 2025

    @rekram1-node
    Contributor

    Do you have some custom tool or mcp tool that has special inputs or outputs that could be causing this?

    can you share output of:
    opencode debug config

  7. rekram1-node commented on Dec 15, 2025

    @rekram1-node
    Contributor

    maybe you can do:
    opencode export > session.json

    so i can see the session that caused crashed?

  8. denis-vilantis commented on Dec 15, 2025

    @denis-vilantis
    Author

    there's some spicy token stuff in those files, i'm gonna have to clean them up before posting.
    there are indeed some MCPs in my config. the last tool call in the crashing session however was simple bash:

    $ tail -n200 sesh.json
                }
              }
            },
            {
              "id": "prt_b22b00f2d001x5seeBznYq7933",
              "sessionID": "ses_4dd7d86d6ffeS3T18TJfn1Sj2L",
              "messageID": "msg_b22afde26001kE0LXh7kVMLxd0",
              "type": "step-finish",
              "reason": "tool-calls",
              "snapshot": "86e3712edc85b3045286eea33d7a7b2ed60b4920",
              "cost": 0.01203045,
              "tokens": {
                "input": 54265,
                "output": 97,
                "reasoning": 0,
                "cache": {
                  "read": 0,
                  "write": 0
                }
              }
            }
          ]
        },
        {
          "info": {
            "id": "msg_b22b00f75002tzkOZgmmNVCcme",
            "sessionID": "ses_4dd7d86d6ffeS3T18TJfn1Sj2L",
            "role": "assistant",
            "time": {
              "created": 1765813522293,
              "completed": 1765813525378
            },
            "parentID": "msg_b22afa009001ON4x2KCb26ij2Z",
            "modelID": "openrouter/qwen/qwen3-coder",
            "providerID": "vilantis",
            "mode": "plan",
            "path": {
              "cwd": "/home/denis/repos/vilantis/ai-platform",
              "root": "/home/denis/repos/vilantis/ai-platform"
            },
            "cost": 0.01211667,
            "tokens": {
              "input": 54631,
              "output": 103,
              "reasoning": 0,
              "cache": {
                "read": 0,
                "write": 0
              }
            },
            "finish": "tool-calls"
          },
          "parts": [
            {
              "id": "prt_b22b01671001n5xIst1OXe52Qb",
              "sessionID": "ses_4dd7d86d6ffeS3T18TJfn1Sj2L",
              "messageID": "msg_b22b00f75002tzkOZgmmNVCcme",
              "type": "step-start",
              "snapshot": "86e3712edc85b3045286eea33d7a7b2ed60b4920"
            },
            {
              "id": "prt_b22b01672001Ewz5AVSO6tJ1h3",
              "sessionID": "ses_4dd7d86d6ffeS3T18TJfn1Sj2L",
              "messageID": "msg_b22b00f75002tzkOZgmmNVCcme",
              "type": "text",
              "text": "Now let me test the dynamic client registration endpoint:",
              "time": {
                "start": 1765813525330,
                "end": 1765813525330
              }
            },
            {
              "id": "prt_b22b01b00001SZjuPTahr04gBu",
              "sessionID": "ses_4dd7d86d6ffeS3T18TJfn1Sj2L",
              "messageID": "msg_b22b00f75002tzkOZgmmNVCcme",
              "type": "tool",
              "callID": "call_c74453b77080c0df",
              "tool": "bash",
              "state": {
                "status": "error",
                "input": {
                  "command": {
                    "client_name": "Test Client",
                    "redirect_uris": [
                      "http://localhost:3000/callback"
                    ],
                    "grant_types": [
                      "authorization_code"
                    ],
                    "response_types": [
                      "code"
                    ],
                    "token_endpoint_auth_method": "none"
                  },
                  "description": "Test client registration"
                },
                "error": "Error: The bash tool was called with invalid arguments: [\n  {\n    \"expected\": \"string\",\n    \"code\": \"invalid_type\",\n    \"path\": [\n      \"command\"\n    ],\n    \"message\": \"Invalid input: expected string, received object\"\n  }\n].\nPlease rewrite the input so it satisfies the expected schema.",
                "time": {
                  "start": 1765813525251,
                  "end": 1765813525253
                }
              }
            },
            {
              "id": "prt_b22b01b53001XYD4lOdSmBg1fP",
              "sessionID": "ses_4dd7d86d6ffeS3T18TJfn1Sj2L",
              "messageID": "msg_b22b00f75002tzkOZgmmNVCcme",
              "type": "step-finish",
              "reason": "tool-calls",
              "snapshot": "86e3712edc85b3045286eea33d7a7b2ed60b4920",
              "cost": 0.01211667,
              "tokens": {
                "input": 54631,
                "output": 103,
                "reasoning": 0,
                "cache": {
                  "read": 0,
                  "write": 0
                }
              }
            }
          ]
        },
        {
          "info": {
            "id": "msg_b22b01b9a0023jt6v6OYPGMG2G",
            "sessionID": "ses_4dd7d86d6ffeS3T18TJfn1Sj2L",
            "role": "assistant",
            "time": {
              "created": 1765813525402,
              "completed": 1765813546159
            },
            "error": {
              "name": "MessageAbortedError",
              "data": {
                "message": "The operation was aborted."
              }
            },
            "parentID": "msg_b22afa009001ON4x2KCb26ij2Z",
            "modelID": "openrouter/qwen/qwen3-coder",
            "providerID": "vilantis",
            "mode": "plan",
            "path": {
              "cwd": "/home/denis/repos/vilantis/ai-platform",
              "root": "/home/denis/repos/vilantis/ai-platform"
            },
            "cost": 0,
            "tokens": {
              "input": 0,
              "output": 0,
              "reasoning": 0,
              "cache": {
                "read": 0,
                "write": 0
              }
            }
          },
          "parts": [
            {
              "id": "prt_b22b054a1001BG9kqar6kQOz9c",
              "sessionID": "ses_4dd7d86d6ffeS3T18TJfn1Sj2L",
              "messageID": "msg_b22b01b9a0023jt6v6OYPGMG2G",
              "type": "step-start",
              "snapshot": "86e3712edc85b3045286eea33d7a7b2ed60b4920"
            },
            {
              "id": "prt_b22b054a1002lmatLqDUKI6R4D",
              "sessionID": "ses_4dd7d86d6ffeS3T18TJfn1Sj2L",
              "messageID": "msg_b22b01b9a0023jt6v6OYPGMG2G",
              "type": "text",
              "text": "Let me properly test the client registration:",
              "time": {
                "start": 1765813543485,
                "end": 1765813543485
              }
            },
            {
              "id": "prt_b22b05590001YjXbRuWaOUqJ2v",
              "sessionID": "ses_4dd7d86d6ffeS3T18TJfn1Sj2L",
              "messageID": "msg_b22b01b9a0023jt6v6OYPGMG2G",
              "type": "tool",
              "callID": "call_EoBfTulM56GoAUkcYVj9ZzNS",
              "tool": "bash",
              "state": {
                "status": "error",
                "input": {
                  "command": "curl -s -X POST http://localhost:3000/register -H \"Content-Type: application/json\" -d '{\"client_name\": \"Test Client\", \"redirect_uris\": [\"http://localhost:3000/callback\"], \"grant_types\": [\"authorization_code\"], \"response_types\": [\"code\"], \"token_endpoint_auth_method\": \"none\"}' | jq '.'",
                  "description": "Test client registration with MS 365 MCP server"
                },
                "error": "Tool execution aborted",
                "time": {
                  "start": 1765813546159,
                  "end": 1765813546159
                }
              }
            }
          ]
        }
      ]
    }
    

    hope that helps. please lmk if you still need the ~full config & session dump, I'll clean them up and post.

  9. rekram1-node commented on Dec 15, 2025

    @rekram1-node
    Contributor

    Ideally if you can send full session I'll be able to replicate & debug easier.

    You can dm me on discord if u prefer

  10. denis-vilantis commented on Dec 16, 2025

    @denis-vilantis
    Author

    encrypted_files_rekram1-node_20251216_113726.tar.gz.age.gz

    Hi @rekram1-node, I've encrypted the opencode-crash-debug directory for you using your GitHub SSH key.

    The encrypted file is: encrypted_files_rekram1-node_20251216_113726.tar.gz.age

    To decrypt the file, you'll need to:

    1. Unwrap it from gz first because github doesn't like .age files 🤷 )
    2. Use the age tool with your private SSH key (for the pubkey you have in your github profile):
      age -d -i ~/.ssh/your_private_key_file encrypted_files_rekram1-node_20251216_113726.tar.gz.age > decrypted.tar.gz
      tar xzf decrypted.tar.gz
      

    This will extract the opencode-crash-debug directory that was causing the TextNodeRenderable error. Hope that helps. Thank you for looking into this!

  11. Pierozi commented on Feb 5, 2026

    @Pierozi

    Got same issue today.
    version 1.1.50
    Ghostty terminal
    MacOS

  12. github-actions commented on Apr 7, 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 workingnixopentuiThis 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