RUN v4.1.1 /home/sawyer/projects/bb/.claude/worktrees/wf_242c3e11-a10-11/packages/agent-runtime stdout | src/pi/issue-1681-process-notification.repro.test.ts > issue #1681 — Pi process notification wake > translates an idle attention:turn notification into one visible turn with input and completion translated: [ "turn/started", "provider/unhandled(sdk/message_start)", "provider/unhandled(sdk/message_end)", "provider/unhandled(sdk/agent_end)" ] ❯ @bb/agent-runtime src/pi/issue-1681-process-notification.repro.test.ts (1 test | 1 failed) 17ms × translates an idle attention:turn notification into one visible turn with input and completion 16ms ⎯⎯⎯⎯⎯⎯⎯ Failed Tests 1 ⎯⎯⎯⎯⎯⎯⎯ FAIL @bb/agent-runtime src/pi/issue-1681-process-notification.repro.test.ts > issue #1681 — Pi process notification wake > translates an idle attention:turn notification into one visible turn with input and completion AssertionError: expected [ { …(7) }, { …(7) }, { …(7) } ] to deeply equal [] - Expected + Received - [] + [ + { + "providerId": "pi", + "providerThreadId": "pi-thread-1", + "rawEvent": { + "jsonrpc": "2.0", + "method": "sdk/message", + "params": { + "message": { + "message": { + "content": "Process completed successfully", + "customType": "ad-process:notification", + "details": { + "attention": "turn", + "kind": "success", + "processId": "proc_551c", + }, + "display": true, + "role": "custom", + "timestamp": 1786919243630, + }, + "type": "message_start", + }, + "threadId": "pi-thread-1", + }, + }, + "rawType": "sdk/message_start", + "scope": { + "kind": "turn", + "turnId": "turn-1", + }, + "threadId": "pi-thread-1", + "type": "provider/unhandled", + }, + { + "providerId": "pi", + "providerThreadId": "pi-thread-1", + "rawEvent": { + "jsonrpc": "2.0", + "method": "sdk/message", + "params": { + "message": { + "message": { + "content": "Process completed successfully", + "customType": "ad-process:notification", + "details": { + "attention": "turn", + "kind": "success", + "processId": "proc_551c", + }, + "display": true, + "role": "custom", + "timestamp": 1786919243630, + }, + "type": "message_end", + }, + "threadId": "pi-thread-1", + }, + }, + "rawType": "sdk/message_end", + "scope": { + "kind": "turn", + "turnId": "turn-1", + }, + "threadId": "pi-thread-1", + "type": "provider/unhandled", + }, + { + "providerId": "pi", + "providerThreadId": "pi-thread-1", + "rawEvent": { + "jsonrpc": "2.0", + "method": "sdk/message", + "params": { + "message": { + "messages": [ + { + "content": "Process completed successfully", + "customType": "ad-process:notification", + "details": { + "attention": "turn", + "kind": "success", + "processId": "proc_551c", + }, + "display": true, + "role": "custom", + "timestamp": 1786919243630, + }, + { + "api": "openai-responses", + "content": [ + { + "text": "The sleep process finished.", + "type": "text", + }, + ], + "model": "gpt-5.6-sol", + "provider": "openai-codex", + "role": "assistant", + "stopReason": "stop", + "timestamp": 1786919246950, + "usage": { + "cacheRead": 0, + "cacheWrite": 0, + "cost": { + "cacheRead": 0, + "cacheWrite": 0, + "input": 0, + "output": 0, + "total": 0, + }, + "input": 10, + "output": 5, + "totalTokens": 15, + }, + }, + ], + "type": "agent_end", + "willRetry": false, + }, + "threadId": "pi-thread-1", + }, + }, + "rawType": "sdk/agent_end", + "scope": { + "kind": "turn", + "turnId": "turn-1", + }, + "threadId": "pi-thread-1", + "type": "provider/unhandled", + }, + ] ❯ src/pi/issue-1681-process-notification.repro.test.ts:84:72 82| 83| // (1) the custom message_start/message_end envelopes must not sur… 84| expect(all.filter((event) => event.type === "provider/unhandled"))… | ^ 85| [], 86| ); ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯ Test Files 1 failed (1) Tests 1 failed (1) Start at 07:17:46 Duration 731ms (transform 379ms, setup 0ms, import 611ms, tests 17ms, environment 0ms)