fix(workflows): transcript defaults to path-only, inline on tail/limit - #1316
Conversation
Implementation NotesTask: Implement GitHub issue #1314 in the @bastani/workflows package: "Workflow transcript tools should return a transcript file path + lazy-read prompt instead of dumping full transcript text." ContextThe repo is the ProblemThe workflow Exact scope of changes
Required behavior
Acceptance criteria (all must hold)
Validation (must all pass before opening PR)
PROpen a pull request from branch Running Notes
Iteration 1 notes (2026-06-08)Delegation and setup
Decisions / tradeoffs
Files changed
Validation outcomes
Deviations / blockers
|
Review —
|
Address PR #1316 review feedback: - Collapse redundant `pathForLazyRead` fallback; `transcriptPath` already resolves to `sessionFile`, so the second `?? sessionFile` was dead. - Make the path-only default the cheap hot path: pass entries via a lazy `buildEntries` thunk plus an explicit cheap `entryCount` so large transcripts are no longer mapped/built just to be discarded. - Document `truncated` semantics in path-only mode (advisory "more on disk", cosmetic suffix only; no consumer re-fetches on it). - Drop the unused `"notice"` TranscriptInlineMode variant. No behavior change; full unit suite, typecheck, and lint pass.
|
Review: default transcript to path-only Solid, well-scoped change. The core idea — keeping large transcript bodies/tool output out of model context by default and surfacing a path + lazy-read prompt — is implemented cleanly, and the docs (README, tool description, schema, changelog) are all updated consistently with no stale "5-entry default" references left behind. Test coverage is genuinely good: path-only default, explicit Things I liked
Minor points (non-blocking)
Nothing here blocks merge — (1) and (2) are the only behavioral edges worth a second look. Could not run |
#1316) * fix(workflows): return transcript paths by default * refactor(workflows): tidy transcript path-only result shaping Address PR #1316 review feedback: - Collapse redundant `pathForLazyRead` fallback; `transcriptPath` already resolves to `sessionFile`, so the second `?? sessionFile` was dead. - Make the path-only default the cheap hot path: pass entries via a lazy `buildEntries` thunk plus an explicit cheap `entryCount` so large transcripts are no longer mapped/built just to be discarded. - Document `truncated` semantics in path-only mode (advisory "more on disk", cosmetic suffix only; no consumer re-fetches on it). - Drop the unused `"notice"` TranscriptInlineMode variant. No behavior change; full unit suite, typecheck, and lint pass.
Summary
Transcript introspection now returns path metadata and a lazy-read prompt by default when a `sessionFile`/`transcriptPath` exists, keeping entry bodies and tool output out of model context. Inline previews are an explicit opt-in via `tail`/`limit`; stages with no transcript path fall back to a bounded preview with a `fallbackNote`.
Closes #1314
Key changes
Breaking changes / migration notes
The default transcript response shape changes: callers that previously expected `entries` to contain inline content when no `tail`/`limit` was passed will now receive `entries: []` with `entryLimit: 0` and a `lazyReadPrompt`. Pass `tail` or `limit` explicitly to restore inline preview behaviour.
Acceptance criteria
Validation