diff --git a/packages/core/src/agents/remote-invocation.test.ts b/packages/core/src/agents/remote-invocation.test.ts index 2982e18d70..04ca486aaf 100644 --- a/packages/core/src/agents/remote-invocation.test.ts +++ b/packages/core/src/agents/remote-invocation.test.ts @@ -850,6 +850,7 @@ describe('RemoteAgentInvocation', () => { const info = bgListener.mock.calls[0][0]; expect(info.executionId).toBe(capturedExecutionId); expect(info.executionMethod).toBe('remote_agent'); + expect(info.completionBehavior).toBe('inject'); expect(info.injectionText).toContain( "Remote agent 'Test Agent' completed successfully", ); diff --git a/packages/core/src/agents/remote-invocation.ts b/packages/core/src/agents/remote-invocation.ts index 080031234d..e7ea9ff9ce 100644 --- a/packages/core/src/agents/remote-invocation.ts +++ b/packages/core/src/agents/remote-invocation.ts @@ -149,6 +149,7 @@ export class RemoteAgentInvocation extends BaseToolInvocation< return output ? `${header}\nOutput:\n${output}` : header; }, agentLabel, + 'inject', ); // createExecution always produces a valid numeric ID const executionId = handle.pid!;