cyberine
UsageRun recipes

Claude cold-spawn session-persistence suppression (T627)

Every cold-spawn claude build-worker dispatch left a resumable session transcript on disk under the operator's own ~/.claude session store, even though Cyberine never resumes a cold-spawn worker — pure clutter at fan-out scale. makeClaudeAdapter now passes the CLI's own --no-session-persistence flag on the cold-spawn path so that transcript is never written.

Run recipe — nothing to enable; the flag is applied automatically. To see it in the built argv without dispatching a real task:

npm run selftest:no-session-persistence

How it's scoped: --no-session-persistence is added whenever !opts.warmSession && !opts.captureSessionTree — i.e. omitted for a worker built with warm-session resume (opts.warmSession, T333) so a later --resume <id> still has a transcript to resume, and omitted for a worker built with session-topology capture (opts.captureSessionTree, T333) as a conservative choice. Neither option is set by the production buildAdapters.ts 'claude' case today, so in practice the flag applies to every fleet-dispatched claude worker.

Known limitations and deferred work:

  • No opt-out env var exists — the flag is unconditional whenever the two opts above are both falsy. An operator who wants a cold-spawn claude transcript kept for manual claude --resume <id> debugging currently has no toggle; add one if that need materializes.
  • Adoption was gated on a live probe against the installed CLI (v2.1.246 at the time), not on reading the flag's own help text alone — see docs/providers/claude-code-cli.md ("Gotchas") for the full probe record and evidence that session_id and session-topology fields still reach Cyberine's own stream-json parsers with the flag set.