Skip to content

opentui: fatal: Added line count did not match for hunk at line 5 #3864

Closed as duplicate

Description

@Cluster444

Description

Error: Added line count did not match for hunk at line 5
    at parseHunk (../../node_modules/.bun/diff@8.0.2/node_modules/diff/libesm/patch/parse.js:119:23)
    at parseIndex (../../node_modules/.bun/diff@8.0.2/node_modules/diff/libesm/patch/parse.js:38:34)
    at parsePatch (../../node_modules/.bun/diff@8.0.2/node_modules/diff/libesm/patch/parse.js:127:9)
    at <anonymous> (src/cli/cmd/tui/routes/session/index.tsx:387:23)
    at <anonymous> (src/cli/cmd/tui/routes/session/index.tsx:396:8)
    at runComputation (../../node_modules/.bun/solid-js@1.9.9/node_modules/solid-js/dist/dev.js:742:22)
    at updateComputation (../../node_modules/.bun/solid-js@1.9.9/node_modules/solid-js/dist/dev.js:724:3)
    at runTop (../../node_modules/.bun/solid-js@1.9.9/node_modules/solid-js/dist/dev.js:833:7)
    at runQueue (../../node_modules/.bun/solid-js@1.9.9/node_modules/solid-js/dist/dev.js:904:42)
    at completeUpdates (../../node_modules/.bun/solid-js@1.9.9/node_modules/solid-js/dist/dev.js:860:84)
    at runUpdates (../../node_modules/.bun/solid-js@1.9.9/node_modules/solid-js/dist/dev.js:850:5)
    at setStore (../../node_modules/.bun/solid-js@1.9.9/node_modules/solid-js/store/dist/dev.js:221:5)
    at <anonymous> (src/cli/cmd/tui/context/sync.tsx:73:13)
    at emit (../../node_modules/.bun/@solid-primitives+event-bus@1.1.2+820208fac86deffb/node_modules/@solid-primitives/event-bus/dist/eventBus.js:6:13)
    at emit (../../node_modules/.bun/@solid-primitives+event-bus@1.1.2+820208fac86deffb/node_modules/@solid-primitives/event-bus/dist/emitter.js:92:20)
    at <anonymous> (src/cli/cmd/tui/context/sdk.tsx:25:17)
    at processTicksAndRejections (native:7:39)...

OpenCode version

No response

Steps to reproduce

I think i was hitting undo? but this was new so now i don't recall lol

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Activity

  1. github-actions commented on Nov 4, 2025

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    All of these share identical stack traces involving diff parsing in the TUI and appear to be related to undo operations. The pattern suggests this is a recurring issue with the diff parsing logic when undoing changes.

    Feel free to ignore if none of these address your specific case.

  2. rekram1-node commented on Nov 4, 2025

    @rekram1-node
    Contributor

    yeah we will fix this

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions