Skip to content

[Agent] Worker-pool wedge observability: wedged-command count on heartbeat + shorter watchdog tier for ephemeral commands #2400

Description

@ToddHebebrand

Description

Two follow-ups deliberately not taken in PR #2395 (#2387 hardening), both blocked on open PRs merging:

  1. Fleet-level wedged-worker visibility: PR fix(agent): bound worker-wedging blockers that retain command payloads (#2387) #2395 adds a log-only 2h in-flight watchdog in executeCommandViaPool. The count of in-flight/overdue commands should ride the heartbeat payload so wedged workers are visible fleet-wide from the dashboard — this is exactly the signal that would have shortcut the [Agent] macOS agent retains ~2.5 GB of live, compressed heap (root cause unconfirmed — evidence + leading suspect) #2387 investigation. Natural home: the agentRuntime gauges object added by PR feat(agent): runtime memory gauges on heartbeat + on-demand pprof capture (#2389) #2394 (which lands in device_metrics.custom_metrics).

  2. Shorter watchdog tier for ephemeral commands: terminal_data / tunnel_data / desktop input (isEphemeralCommand, agent/internal/heartbeat/heartbeat.go:3547) should complete in milliseconds; the 2h tier is far too coarse to catch a wedged interactive path early. Add a short tier (e.g. 60s log-only) for ephemeral command types.

Blocked On

Affected Files

Refs #2387.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions