Commit 722338d
feat: pausable child timeouts, broader allowlist, worktree status (Joe 3/5) (#503)
* feat: realtime blocked-child notifications for the orchestrator
When a child session blocks on a tool approval or question, the parent
orchestrator now gets an immediate push notification with the requestId
and the exact API call to respond, instead of the child silently dying
at timeout. Adds a 'blocked' child status, stops auto-denying pending
prompts when the last client leaves an agent session, and replaces the
headless-agent fast-deny with the normal prompt flow (5-min timeout
remains the backstop).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: persistent notification outbox with replay when the orchestrator returns
Notifications to the orchestrator (Agent Joe) were silently dropped when
its Claude process was not running — terminal child-session events and
monitor alerts vanished, so Joe woke up with no idea what happened while
it was down.
- New OrchestratorOutbox: JSON-file-backed queue (survives restarts,
capped at 200 items) with a 60s background flusher that replays queued
items as a single digest message once the orchestrator session is
alive again. Flush is gated on the rate-limit circuit breaker and
clears the queue before sending to avoid double-delivery.
- sendOrchestratorNotification now enqueues to the outbox when the
parent is unreachable and returns true (the outbox owns delivery from
that point); false only when queueing itself fails.
- OrchestratorMonitor.deliverToOrchestrator enqueues instead of
dropping when the orchestrator process is down.
- Flusher wired up at server boot in ws-server.ts.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: pausable child timeouts, broader allowlist, worktree status in spawn response
Blocked children used to burn their whole timeout waiting on an approval
the orchestrator never saw — with PR1's realtime blocked notifications in
place, the timeout now pauses while a child waits for an answer.
- Working-time clock pauses when a child blocks on an approval/question
and resumes (with the remaining budget) once the prompt is answered;
a separate 30-min blocked-time cap still terminates abandoned children.
- DEFAULT_TIMEOUT_MS raised from 10 to 30 minutes; spawn API now accepts
and validates timeoutMs (1 min – 4 h), documented in Joe's CLAUDE.md.
- AGENT_CHILD_ALLOWED_TOOLS broadened: python3, pytest, sed, rg, jq,
mkdir, cp, mv, touch (rm/sudo/docker still require approval).
- ChildSession now reports worktree status ('active'/'failed'/'none')
and worktreePath so the orchestrator knows when isolation failed.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 718b449 commit 722338d
4 files changed
Lines changed: 254 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
| |||
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
18 | | - | |
| 17 | + | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
| |||
138 | 137 | | |
139 | 138 | | |
140 | 139 | | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
141 | 164 | | |
142 | 165 | | |
143 | 166 | | |
| |||
272 | 295 | | |
273 | 296 | | |
274 | 297 | | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
275 | 320 | | |
276 | 321 | | |
277 | 322 | | |
| |||
305 | 350 | | |
306 | 351 | | |
307 | 352 | | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
308 | 442 | | |
309 | 443 | | |
310 | 444 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
36 | 40 | | |
37 | 41 | | |
38 | 42 | | |
| |||
69 | 73 | | |
70 | 74 | | |
71 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
72 | 85 | | |
73 | 86 | | |
74 | 87 | | |
| |||
83 | 96 | | |
84 | 97 | | |
85 | 98 | | |
86 | | - | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
87 | 106 | | |
88 | 107 | | |
89 | 108 | | |
| |||
108 | 127 | | |
109 | 128 | | |
110 | 129 | | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
111 | 136 | | |
112 | 137 | | |
113 | 138 | | |
| |||
126 | 151 | | |
127 | 152 | | |
128 | 153 | | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
129 | 160 | | |
130 | 161 | | |
131 | 162 | | |
| |||
153 | 184 | | |
154 | 185 | | |
155 | 186 | | |
| 187 | + | |
| 188 | + | |
156 | 189 | | |
157 | 190 | | |
158 | 191 | | |
| |||
294 | 327 | | |
295 | 328 | | |
296 | 329 | | |
| 330 | + | |
| 331 | + | |
297 | 332 | | |
298 | 333 | | |
299 | 334 | | |
| |||
315 | 350 | | |
316 | 351 | | |
317 | 352 | | |
318 | | - | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
319 | 357 | | |
320 | 358 | | |
321 | 359 | | |
| |||
530 | 568 | | |
531 | 569 | | |
532 | 570 | | |
533 | | - | |
534 | | - | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
535 | 587 | | |
536 | 588 | | |
537 | | - | |
| 589 | + | |
538 | 590 | | |
| 591 | + | |
539 | 592 | | |
540 | 593 | | |
541 | 594 | | |
542 | 595 | | |
543 | 596 | | |
544 | 597 | | |
545 | | - | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
546 | 627 | | |
547 | 628 | | |
548 | 629 | | |
| |||
552 | 633 | | |
553 | 634 | | |
554 | 635 | | |
555 | | - | |
| 636 | + | |
556 | 637 | | |
557 | 638 | | |
558 | 639 | | |
| |||
564 | 645 | | |
565 | 646 | | |
566 | 647 | | |
| 648 | + | |
567 | 649 | | |
568 | 650 | | |
569 | 651 | | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
570 | 657 | | |
571 | 658 | | |
572 | 659 | | |
| |||
575 | 662 | | |
576 | 663 | | |
577 | 664 | | |
578 | | - | |
| 665 | + | |
579 | 666 | | |
580 | 667 | | |
581 | 668 | | |
| |||
590 | 677 | | |
591 | 678 | | |
592 | 679 | | |
593 | | - | |
| 680 | + | |
594 | 681 | | |
595 | 682 | | |
596 | 683 | | |
| |||
601 | 688 | | |
602 | 689 | | |
603 | 690 | | |
| 691 | + | |
604 | 692 | | |
605 | 693 | | |
606 | 694 | | |
| |||
0 commit comments