diff --git a/container/agent-runner/src/poll-loop.test.ts b/container/agent-runner/src/poll-loop.test.ts index 29b769bbba..085cc61df6 100644 --- a/container/agent-runner/src/poll-loop.test.ts +++ b/container/agent-runner/src/poll-loop.test.ts @@ -37,13 +37,15 @@ describe('formatter', () => { expect(prompt).toContain('Hello world'); }); - it('should format multiple chat messages as XML block', () => { + it('should format multiple chat messages as distinct blocks', () => { insertMessage('m1', 'chat', { sender: 'John', text: 'Hello' }); insertMessage('m2', 'chat', { sender: 'Jane', text: 'Hi there' }); const messages = getPendingMessages(); const prompt = formatMessages(messages); - expect(prompt).toContain(''); - expect(prompt).toContain(''); + // The envelope was dropped in fe2e881b (#2556) so the SDK calls + // the API; each message is now its own self-contained block. + expect(prompt).not.toContain(''); + expect(prompt.match(/