Skip to main content
← Back to list
01Issue
BugShippedExtensionsPublic
Assigneeszack

Relationships

#4742 agent-sessions assess: fails on transcripts over ~512 MB and skips symlinked transcripts

Opened by sergical · 11/14/2026· Shipped 11/14/2026

Description

assess in @swamp/agent-sessions has two problems when it reads transcript directories.

  1. A transcript larger than about 512 MB stops the whole run. The method fails with Error: failed to allocate string; buffer exceeds maximum length. No candidate set is written, also not for the other transcripts.
  2. Symlinked transcript files are skipped without a message. A directory that holds only a symlink to a valid .jsonl transcript gives zero sessions. The window in swampify-candidates has since equal to until, and candidates is []. The same file as a hard link is read correctly.

Steps to reproduce

Large file:

  1. Make a directory tree big/codex/2026/11/01/ and an empty big/claude/.
  2. Put one Codex rollout .jsonl file of 842 MB in big/codex/2026/11/01/ (a hard link to a real rollout was used).
  3. Run swamp behavior run sessions assess --input all=true --input projectsDir=<abs>/big/claude --input codexDir=<abs>/big/codex.
  4. Result: Error: failed to allocate string; buffer exceeds maximum length.

Symlink:

  1. Make sym/claude/p/ and an empty sym/codex/.
  2. In sym/claude/p/, make a symlink to a valid Claude Code transcript of about 1 MB.
  3. Run assess with projectsDir=<abs>/sym/claude and codexDir=<abs>/sym/codex.
  4. Result: the run succeeds, but the window is empty (since equals until) and no session is read.
  5. Control: replace the symlink with a hard link to the same file. The window then ends at the time of the session, so the file is read.

Expected behavior

  1. Read large transcripts line by line (a stream), or skip a file that is too large with a warning and continue with the other files.
  2. Follow symlinks to files, or log a warning for each skipped symlink.

Environment

  • swamp CLI 20261114.022954.0-sha.b5fb73d0
  • @swamp/agent-sessions 2026.11.13.2 (also seen on 2026.11.11.1)
  • macOS (Darwin 25.6.0), Apple silicon

Workaround

Hard-link the transcripts smaller than 400 MB into a separate directory and give that directory to projectsDir and codexDir.

Upstream repository: https://github.com/swamp-club/swamp-extensions

Environment

  • Extension: @swamp/agent-sessions@2026.11.13.2
  • swamp: 20261114.022954.0-sha.b5fb73d0
  • OS: darwin (aarch64)
  • Deno: 2.9.8
  • Shell: /bin/zsh
02Bog Flow
✓OPEN✓TRIAGED✓IN PROGRESS✓SHIPPED+ 1 MOREASSIGNED+ 5 MOREREVIEW+ 10 MOREPR_MERGED+ 2 MORESESSION_SUMMARIZED

Shipped

11/14/2026, 3:30:19 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
zack assigned zack11/14/2026, 2:41:14 PM
Editable. Press Enter to edit.

system commented 11/14/2026, 7:52:32 AM

Classified automatically when this issue was filed.

  • Source: Extensions

If you feel this classification is incorrect, add a ripple to tell us so.

zack commented 11/14/2026, 3:30:21 PM

Thanks @sergical for reporting this! We shipped: Fix two @swamp/agent-sessions discovery/read defects. (1) Read transcripts line by line through a new streaming reader instead of Deno.readTextFile, in both assess and import, so files over V8's ~512 MB string limit no longer abort assess (or get skipped by import); a single line over 256 MiB is skipped as an unparseable line. (2) Follow symlinks to files and directories in Claude Code project/transcript/subagent discovery and the Codex rollout walk; dangling links are skipped like vanished files.. The fix has been merged and a release is on its way. We appreciate your contribution to swamp.

Sign in to post a ripple.