Commit fd2fc5c
fix: prime message reporter on session restore so wake replies persist
The normal agent-session-create path (handleCreateAgentSession) sets
runtime.ProjectID and creates/binds the per-workspace message reporter via
getOrCreateReporter before the agent runs. The restore path only recreated
the session host + SelectAgent, so the restored agent's streamed output had
no reporter to enqueue to — replies were generated (ACP prompt completed)
but never POSTed to /messages, so no answer appeared after wake.
Restore now primes the reporter with the workspace's projectID (from the
runtime or PROJECT_ID env) and the restored chatSessionID.
Diagnosed from staging Worker logs: message POSTs present during setup,
zero after wake despite ACP prompt completing with no auth errors.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 44e8166 commit fd2fc5c
1 file changed
Lines changed: 32 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
305 | 305 | | |
306 | 306 | | |
307 | 307 | | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
308 | 313 | | |
309 | 314 | | |
310 | 315 | | |
| |||
323 | 328 | | |
324 | 329 | | |
325 | 330 | | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
326 | 358 | | |
327 | 359 | | |
328 | 360 | | |
| |||
0 commit comments