Skip to content

feat(observability): heartbeat / progress events for long-running tasks #153

Description

@ZuyiZhou

Problem

A deep-research task can legitimately run 20–30 minutes. Today it emits nothing while running, so "still digging" and "hung" look identical from the outside. Stall-detection thresholds in batch harnesses end up being guesswork, and every team wraps Raven in its own ad-hoc watchdog.

Proposal

A periodic, machine-readable heartbeat (configurable interval, e.g. 30 s) to stdout / log / callback:

{ "event": "heartbeat", "turn": 12, "tool_calls": 34, "last_activity_ts": 1789000000, "tokens_in_context": 41200 }
  • last_activity_ts alone would already let a supervisor distinguish "in progress" from "wedged".
  • Turn / tool-call counters additionally enable cheap online progress dashboards for batch runs.

Pairs with #149: heartbeat covers the run's lifetime, termination reason covers its end.

Metadata

Metadata

Assignees

No one assigned

    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