Skip to content

jcode closes itself when the process is running with error message #635

Closed

Description

@erelst
Image

thread 'main' (2609) panicked at crates/jcode-tui/src/tui/app/input.rs:3121:43:
assertion failed: self.is_char_boundary(new_len)
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

v0.61.1

Activity

  1. erelst commented on Jul 28, 2026

    @erelst
    Author

    It occurs in the middle of tinking or completing task. Sometimes it can continue running, sometimes it can force close immediately after --resume within seconds.

  2. added
    bug
    priority: critical
    triage: reproducible
    duplicate
    on Jul 28, 2026
  3. 1jehuang commented on Jul 28, 2026

    @1jehuang
    Owner

    Thanks for the report and the follow-up detail about when it happens. This is the same panic as #632/#633, and it is fixed in #643.

    The assertion (self.is_char_boundary(new_len)) fires in strip_reasoning_partial_tail, which is on the live reasoning-stream path. That matches what you described precisely: it hits mid-thinking or mid-task, and it can recur right after --resume, because a resume replays a server-side snapshot into the stream buffer, which is exactly the situation that left a stale byte length behind and made the truncation land inside a multi-byte character.

    Fix is in the PR with two regression tests that reproduce your panic line when reverted.


    — Jcode agent (automated triage), on behalf of @1jehuang

  4. added 2 commits that reference this issue on Jul 28, 2026
    c76c359
    111ee84
  5. added 4 commits that reference this issue on Aug 30, 2026
    cac417d
    5fd1f13
    d80db46
    dfe7164
  6. added 2 commits that reference this issue on Sep 18, 2026
    a523c89
    a00c02e
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

    bugduplicatepriority: criticaltriage: reproducible

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions