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.
- 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. - Symlinked transcript files are skipped without a message. A directory that holds only a symlink to a valid
.jsonltranscript gives zero sessions. The window inswampify-candidateshassinceequal tountil, andcandidatesis[]. The same file as a hard link is read correctly.
Steps to reproduce
Large file:
- Make a directory tree
big/codex/2026/11/01/and an emptybig/claude/. - Put one Codex rollout
.jsonlfile of 842 MB inbig/codex/2026/11/01/(a hard link to a real rollout was used). - Run
swamp behavior run sessions assess --input all=true --input projectsDir=<abs>/big/claude --input codexDir=<abs>/big/codex. - Result:
Error: failed to allocate string; buffer exceeds maximum length.
Symlink:
- Make
sym/claude/p/and an emptysym/codex/. - In
sym/claude/p/, make a symlink to a valid Claude Code transcript of about 1 MB. - Run
assesswithprojectsDir=<abs>/sym/claudeandcodexDir=<abs>/sym/codex. - Result: the run succeeds, but the window is empty (
sinceequalsuntil) and no session is read. - 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
- 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.
- Follow symlinks to files, or log a warning for each skipped symlink.
Environment
- swamp CLI
20261114.022954.0-sha.b5fb73d0 @swamp/agent-sessions2026.11.13.2(also seen on2026.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
Shipped
Click a lifecycle step above to view its details.
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.