| … | … | @@ -1284,6 +1285,28 @@ export const layer: Layer.Layer< | |
| 1300 | + | !goalCommand && | |
| 1301 | + | (previousMessage === undefined || !isCompactionCommandMessage(previousMessage)) | |
| 1302 | + | ) { | |
| 1303 | + | yield* settleStartFailure({ | |
🟠 High orchestration-v2/ProviderTurnStartService.ts:1303
When retry history exceeds the native budget for a message with attachments, automatic compaction drops those attachments: this branch settles the request as failed, and recovery replays it through prepareRetryHandoff as text-only history, so the provider never receives the image or file. Preserve and resend the original message, including attachments, after compaction instead of relying only on the history handoff.
🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
| 1 | In file @apps/server/src/orchestration-v2/ProviderTurnStartService.ts around line 1303: |
| 2 | |
| 3 | When retry history exceeds the native budget for a message with attachments, automatic compaction drops those attachments: this branch settles the request as failed, and recovery replays it through `prepareRetryHandoff` as text-only history, so the provider never receives the image or file. Preserve and resend the original message, including `attachments`, after compaction instead of relying only on the history handoff. |