Skip to content

Task status stuck as "running" when process exits unexpectedly (killed/sandboxed) #9

@jimmy-claw

Description

@jimmy-claw

Problem

When a task exits unexpectedly (SIGKILL, permission denial, or sandbox block), the task metadata file is never updated from running to failed/completed. The dashboard then shows a stale "running" status indefinitely.

Steps to reproduce

  1. Start a task via openclaw-agent start
  2. Have the Claude Code process get killed (e.g. SIGKILL from OS, or sandbox permission denial blocking all tool use)
  3. Check openclaw-agent list / dashboard — task still shows as running

Expected

Task should transition to failed with an appropriate error when the underlying process exits non-zero or via signal.

Possible fix

  • Poll the PID after SSH session ends and update status if process is gone
  • Write status on SSH session close / process exit hook
  • Add a staleness timeout: mark as failed after N minutes with no output update

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions