Skip to content

fix(coding-agent): repair unterminated session tails - #8346

Open
acmerfight wants to merge 3 commits into
earendil-works:mainfrom
acmerfight:fix-session-manager-torn-tail-upstream
Open

fix(coding-agent): repair unterminated session tails#8346
acmerfight wants to merge 3 commits into
earendil-works:mainfrom
acmerfight:fix-session-manager-torn-tail-upstream

Conversation

@acmerfight

Copy link
Copy Markdown
Contributor

Summary

  • detect malformed or unterminated JSONL tails without changing the file during load
  • repair the tail before the next append by truncating an invalid fragment or adding the missing delimiter
  • keep read-only loads and fork sources unchanged

Fixes #8345

Verification

  • npm run check
  • vitest --run test/suite/regressions/8345-session-manager-torn-tail.test.ts (5 passed)

Detect malformed or unterminated JSONL tails during load without mutating the source, then repair them before the next append.\n\nFixes earendil-works#8345
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SessionManager corrupts the next append after an unterminated JSONL tail

1 participant