Synapse v2.1.5 — "no more argv"¶
Patch release fixing a live-observed ingest failure on large vaults. No schema migrations.
Fixed¶
- CLI provider ingest could fail with "Argument list too long" on large vaults: live
evidence — a ~150-file ingest run processed roughly 30 files cleanly, then every subsequent
file failed the same way. Root cause:
claude-agent-sdkpasses a plain-stringClaudeAgentOptions.system_promptdirectly as aclaudeCLI command-line argument, not via stdin. Synapse's block-loop system prompt (the default ingest path) folds inschema.md/purpose.md/wiki/index.md, andindex.mdis unbounded by design — it grows by one entry per page ever ingested — so as the vault (and thus the prompt) grows, the argument list eventually exceeds the kernel'sARG_MAX, and the spawnedclaudeprocess fails to start (E2BIG) before a single message is exchanged. This explains why early files in a large ingest run succeed and later ones deterministically fail once the vault crosses the size threshold — it is not intermittent, it is monotonic with vault growth. Fixed by routingsystem_promptthrough the SDK'sSystemPromptFileoption (a scoped temp file, cleaned up after the session) at all threeCliAgentProvidercall sites (chat, delegated ingest, block-loop completion) instead of passing it as a raw command-line argument. wiki/index.md's contribution to the block-loop prompt was uncapped: as a complementary hardening (independent of the CLI-transport fix above, so it also bounds prompt size/cost on the API and Local provider backends),index.mdis now capped in the analysis/generation system prompt the same way the review-stage prompt already caps its equivalent section.
Upgrade notes¶
No schema migrations. If a prior ingest run failed with "Argument list too long" (or the
underlying claude-agent-sdk subprocess failed to start) on a large vault, retry it — the
system prompt no longer travels through the command line, so vault size no longer risks
tripping the OS argument-list limit.