The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
fix(chatRuntime): handle missing iteration in persisted subagent items
Steven Enamakel139dfc8864d5
diff --git a/app/src/features/voiceNotes/voiceNoteApi.ts b/app/src/features/voiceNotes/voiceNoteApi.tsindex 3370471c91..a037c18496 100644--- a/app/src/features/voiceNotes/voiceNoteApi.ts+++ b/app/src/features/voiceNotes/voiceNoteApi.ts@@ -60,9 +60,11 @@ export async function voiceNoteContentPart(return {kind: 'voice_note',voiceNote: {+ codec: null,durationMs,waveform,pushToTalk: false,+ transcript: null,media: {opaqueId: noteId,kind: 'audio',diff --git a/app/src/providers/__tests__/ChatRuntimeProvider.test.tsx b/app/src/providers/__tests__/ChatRuntimeProvider.test.tsxindex 9c318bc8a4..db47158a96 100644--- a/app/src/providers/__tests__/ChatRuntimeProvider.test.tsx+++ b/app/src/providers/__tests__/ChatRuntimeProvider.test.tsx@@ -886,7 +886,7 @@ describe('ChatRuntimeProvider — dedupe, proactive resolution, mid-turn invariafileName: 'archive.zip',caption: null,media: {- kind: 'document',+ kind: 'document' as const,url: 'data:application/zip;name=archive.zip;base64,AQID',contentType: null,fileName: 'archive.zip',diff --git a/app/src/services/__tests__/chatService.test.ts b/app/src/services/__tests__/chatService.test.tsindex 9561c6c6b7..0782e3f54a 100644--- a/app/src/services/__tests__/chatService.test.ts+++ b/app/src/services/__tests__/chatService.test.ts@@ -515,7 +515,23 @@ describe('chatService typed attachments', () => {const image = {kind: 'image' as const,- media: { url: 'data:image/png;base64,AAA', contentType: 'image/png', fileName: 'a.png' },+ altText: null,+ caption: null,+ media: {+ kind: 'image' as const,+ url: 'data:image/png;base64,AAA',+ contentType: 'image/png',+ fileName: 'a.png',+ sizeBytes: null,+ codec: null,+ durationMs: null,+ height: null,+ localCachePath: null,+ path: null,+ platformMessageId: null,+ transcribed: false,+ width: null,+ },};it('chatSend forwards attachments as typed parts and leaves the text alone', async () => {diff --git a/app/src/store/__tests__/chatRuntimeSlice.test.ts b/app/src/store/__tests__/chatRuntimeSlice.test.tsindex 3d9b0bc2ff..5ff7da2179 100644--- a/app/src/store/__tests__/chatRuntimeSlice.test.ts+++ b/app/src/store/__tests__/chatRuntimeSlice.test.ts@@ -393,8 +393,12 @@ describe('chatRuntimeSlice', () => {status: 'awaiting_user',workerThreadId: 'worker-1',checkpoint: { resumeTool: 'continue_subagent' },+ checkpointPath: null,+ completedAt: null,+ error: null,summary: 'Which repository should I inspect?',metadata: { mode: 'typed', dedicatedThread: true, displayName: 'Researcher' },+ promptRef: null,telemetry: {runId: 'sub-run-1',inputTokens: 0,diff --git a/app/src/store/__tests__/threadSlice.test.ts b/app/src/store/__tests__/threadSlice.test.tsindex 2f31eaed79..dea1fa3b9f 100644--- a/app/src/store/__tests__/threadSlice.test.ts+++ b/app/src/store/__tests__/threadSlice.test.ts@@ -110,6 +110,8 @@ describe('threadSlice synchronous reducers', () => {channel_event: {version: 2,eventId: 'event-9',+ sourceEventId: null,+ sourceTimestamp: null,channel: { id: 'telegram', accountId: 'bot-1' },conversation: { kind: 'group', id: 'room-1' },type: 'reaction_added',diff --git a/app/src/store/chatRuntimeSlice.ts b/app/src/store/chatRuntimeSlice.tsindex 53d1721b8b..a98b31b829 100644--- a/app/src/store/chatRuntimeSlice.ts+++ b/app/src/store/chatRuntimeSlice.ts@@ -1304,7 +1304,7 @@ function subagentTranscriptItemFromPersisted(detail: item.detail ?? undefined,};}- return { kind: item.kind, iteration: item.iteration, text: item.text };+ return { kind: item.kind, iteration: item.iteration ?? undefined, text: item.text };}function subagentActivityFromPersisted(activity: PersistedSubagentActivity): SubagentActivity {