| … | … | @@ -4665,76 +4669,100 @@ export const makeClaudeAdapterV2 = Effect.fn("makeClaudeAdapterV2")(function* ( | |
| 4732 | - | liveTranscriptReadAt: readLiveTranscript || restarted ? now : liveTranscriptReadAt, | |
| 4733 | 4755 | finalTranscriptRead: | |
| 4734 | 4756 | (!restarted && previous?.finalTranscriptRead === true) || | |
| 4735 | 4757 | (readTranscript && | |
🟠 High Adapters/ClaudeAdapterV2.ts:4757
A completed workflow member's transcript is permanently marked fully read after the first chunk containing assistant text, so later transcript chunks—and their final answer or tool results—are omitted. readWorkflowAgentTranscript can return a cursor before EOF, but this condition sets finalTranscriptRead based only on textShown; drain the transcript to EOF or check the reader's truncated flag before marking it complete.
🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
| 1 | In file @apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts around line 4757: |
| 2 | |
| 3 | A completed workflow member's transcript is permanently marked fully read after the first chunk containing assistant text, so later transcript chunks—and their final answer or tool results—are omitted. `readWorkflowAgentTranscript` can return a cursor before EOF, but this condition sets `finalTranscriptRead` based only on `textShown`; drain the transcript to EOF or check the reader's `truncated` flag before marking it complete. |
Fixed in c05bed4. The settled read now repeats until the reader reports no complete lines left past its 512 KB cap, and finalTranscriptRead is set only once the transcript was read to its end. The reader's truncated also now means only "more complete lines past the cap", not "a half-written last line". New case: "reads a settled workflow member's transcript to its end past the read cap", with about 1.3 MB of replies before the final answer. On the previous head it fails with expected [ …(62) ] to have a length of 81 but got 62.