Skip to content

fix(cursor): bound fragmented transport cost and audit context accounting #431

Description

@tt-a1i

Problem

Follow-up to #429 and v0.6.1: the Cursor receive loop repeatedly concatenates each fragmented Connect frame, causing quadratic copying. An 8 MiB synthetic frame in 16 KiB chunks copies about 2 GiB. Cursor also constructs history in both rootPromptMessagesJson and turns; that local duplication does not establish duplicate model context, so protocol and Pi compaction boundaries need verification before any semantic change. Long child transcript rendering has an existing candidate in #327.

Scope

  • Replace quadratic frame accumulation while preserving frame limits, end/truncation errors, tool handoff, and cancellation.
  • Verify Cursor context/usage behavior using current Pi and protocol evidence; retain unknown usage as unknown rather than fabricating accounting.
  • Inspect perf(tui): render child transcript by viewport window #327 and long transcript rendering, preserving native tool output and layout correctness; avoid an overlapping viewport rewrite without measured benefit.
  • Reproduce defects, add regression coverage, and deliver a reviewable PR with an evidence record.

No user runtime or configuration change is part of this repair.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions