Merged
Size
S
Change Breakdown
Bug Fix85%
Testing15%
#65203Fix cron sessionFile persistence for isolated runs

Isolated cron sessions now write to correct transcript files

A bug in isolated cron runs caused transcript files to accumulate stale content across executions. The fix ensures each run resolves and persists its own session path before writing begins.

When cron jobs run isolated agents, each execution should produce its own transcript file. Instead, a bug caused those runs to keep appending to the same stale file session after session.

The fix works by resolving the transcript path earlier in the execution lifecycle — specifically in the context preparation phase before any persistence happens. A fallback in the executor handles callers that bypass that preparation step, ensuring the session file path is always attached to the session entry.

This matters for anyone relying on cron-scheduled agent runs. Stale transcript files meant logs got mixed across executions, making debugging harder and potentially corrupting session history. Now each run stays cleanly isolated.

The change lives in the cron isolated-agent subsystem of the codebase.

View Original GitHub Description

Fix isolated cron runs so the resolved transcript path is attached to the session entry before persistence, and keep a fallback in the executor.

Validation:

  • pnpm exec vitest run src/cron/isolated-agent.session-identity.test.ts
© 2026 · via Gitpulse