Skip to content

Daemon docker pause/unpause for idle sessions (cut idle CPU/RAM on a fleet) #125

Description

@rappdw

Source: agentbox (madarco) — Aug-2026 landscape pass (research/sandbox-landscape-synthesis-2026-08.md §4, second tier).

What

For daemon sessions (--start), docker pause the agent container on detach and docker unpause on --attach (and skip/handle in --update-sessions). Optional SANDY_DAEMON_PAUSE=1.

Why

Daemon sessions today keep containers fully running between attaches; on a box hosting several long-lived sessions (the always-on/DGX use case) that's idle CPU/RAM. agentbox uses docker pause/unpause for sub-second agent switching; sandy can use it to idle detached sessions cheaply.

Notes

  • Must interoperate with --restart unless-stopped, the readiness gate, the supervisor, and attached_clients accounting (a paused container's tmux won't respond to probes — treat "paused" as a distinct state, not "dead", in the D6/D9 liveness logic and in --gc).
  • Reboot/OOM edge: a paused container's resume semantics under --restart need checking.

Effort: S for the core; the liveness/--gc interplay is the real work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions