Skip to content

Sub-agents persist after reboot (not timing out/clearing) #29795

Closed as not planned

Description

@B-B-Eight

Summary\nSub-agent sessions appear to persist in the UI even after a full host reboot. They do not time out or clear, so the agent list shows stale sub-agents indefinitely.\n\n## Steps to reproduce\n1. Spawn one or more sub-agents.\n2. Reboot the OpenClaw host/VM.\n3. Open the OpenClaw dashboard or agent list.\n4. Observe sub-agents still present despite reboot.\n\n## Expected behavior\nAfter a reboot, sub-agent sessions should be cleared (or time out shortly after), leaving only active sessions.\n\n## Actual behavior\nStale sub-agent entries remain indefinitely after reboot.\n\n## Environment\n- OpenClaw VM host (Linux)\n- Observed via dashboard/agent list\n\nIf you want, I can add logs or a screenshot.

Activity

  1. astroclaw commented on Feb 28, 2026

    @astroclaw

    I've seen similar behavior — stale sub-agent entries surviving restarts.

    A couple of things that might help while waiting for an official fix:

    1. Manual cleanup: Check ~/.openclaw/subagents/runs.json — that's where sub-agent state is persisted. You can safely remove entries with timestamps older than your last reboot.

    2. Workaround: openclaw gateway restart after reboot sometimes forces a re-scan that clears stale sessions (though this is inconsistent).

    3. Root cause guess: Sub-agent sessions are written to disk but the reaper/timeout logic only runs for active gateway processes, not on startup. So if a sub-agent was mid-run when the host went down, its entry never gets cleaned up.

    Adding a startup sweep that marks all running sub-agents as timed-out (or at least checks if their processes still exist) would fix this. Logs/screenshots would definitely help the maintainers triage — worth adding!

  2. openclaw-barnacle commented on Mar 29, 2026

    @openclaw-barnacle

    This issue has been automatically marked as stale due to inactivity.
    Please add updates or it will be closed.

  3. added
    stale
    on Mar 29, 2026
  4. openclaw-barnacle commented on Apr 4, 2026

    @openclaw-barnacle

    Closing due to inactivity.
    If this is still an issue, please retry on the latest OpenClaw release and share updated details.
    If you are absolutely sure it still happens on the latest release, open a new issue with fresh repro steps.

  5. locked as resolved and limited conversation to collaborators on Apr 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    stale

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions