agent-relay-orchestrator 0.129.13 → 0.129.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/control.ts +10 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-relay-orchestrator",
3
- "version": "0.129.13",
3
+ "version": "0.129.15",
4
4
  "description": "Agent Relay orchestrator — manages agent lifecycle across hosts",
5
5
  "type": "module",
6
6
  "bin": {
@@ -17,7 +17,7 @@
17
17
  },
18
18
  "dependencies": {
19
19
  "agent-relay-providers": "0.104.6",
20
- "agent-relay-sdk": "0.2.130",
20
+ "agent-relay-sdk": "0.2.131",
21
21
  "callmux": "0.24.2"
22
22
  },
23
23
  "devDependencies": {
package/src/control.ts CHANGED
@@ -718,8 +718,17 @@ export function managedAgentShutdownTarget(agents: ManagedAgentReport[], ctrl: R
718
718
  return undefined;
719
719
  }
720
720
 
721
+ // #1746 — headroom added to the orchestrator's graceful wait before it SIGKILLs the runner
722
+ // HOST. The requested `timeoutMs` is the PROVIDER's graceful budget; the runner then needs a
723
+ // beat more to run its own verified force-kill of the tmux session and exit. A Claude tmux
724
+ // session is a detached daemon, so SIGKILL-ing the runner host does NOT take it down — if the
725
+ // orchestrator kills the host before the runner finishes its reap, the session orphans (a
726
+ // zombie). This margin lets the runner's own teardown win the race in the common case.
727
+ const RUNNER_TEARDOWN_HEADROOM_MS = 8_000;
728
+
721
729
  function shutdownTimeoutMs(ctrl: Record<string, any>): number | undefined {
722
- return Number.isSafeInteger(ctrl.timeoutMs) && ctrl.timeoutMs > 0 ? Math.min(ctrl.timeoutMs, 60_000) : undefined;
730
+ if (!(Number.isSafeInteger(ctrl.timeoutMs) && ctrl.timeoutMs > 0)) return undefined;
731
+ return Math.min(ctrl.timeoutMs + RUNNER_TEARDOWN_HEADROOM_MS, 60_000);
723
732
  }
724
733
 
725
734
  function spawnOptionsFromRecord(source: Record<string, any>, config: OrchestratorConfig): SpawnOptions {