hatchet icon indicating copy to clipboard operation
hatchet copied to clipboard

[FEAT] Replay-oriented workflow debugging + divergence analysis

Open TheEleventhAvatar opened this issue 6 months ago • 2 comments

Is your feature request related to a problem? Please describe.

As workflows become more stateful, concurrent, and retry-heavy, debugging failures often feels harder than detecting them.

Current traces/logs help identify that a workflow failed, but they often don’t explain:

  • where execution behavior started diverging
  • which retries/state transitions contributed to failure
  • whether a replay is deterministic or partially heuristic

This feels especially relevant for:

  • long-running workflows
  • async/background orchestration
  • flaky/non-deterministic failures
  • agentic systems built on top of Hatchet

Describe the solution you'd like

It would be interesting to explore replay-oriented workflow observability/debugging primitives on top of Hatchet workflows.

Potential capabilities:

  • replay failed workflow executions
  • replay from checkpoints with modified timing/state
  • inspect retry chains and state mutations
  • compare successful vs failed runs
  • identify first divergence points
  • classify recurring workflow failure patterns

One thing that feels especially important is distinguishing:

  • trace capture vs
  • replay safety

For example, replay systems likely need awareness of:

  • read-only vs side-effecting steps
  • retry semantics
  • idempotent vs non-idempotent operations
  • checkpoint/snapshot references

Potentially useful primitives:

  • workflow/session IDs
  • checkpoint references
  • replay receipts
  • execution semantics metadata
  • content-addressed step artifacts

Feels adjacent to observability/reliability tooling rather than traditional logging alone.


Describe alternatives you've considered

Right now most debugging relies on:

  • raw logs
  • trace inspection
  • manual replay attempts
  • custom debugging instrumentation

These approaches help identify that something failed, but often don’t explain how execution behavior diverged over time.

External observability tooling can partially help, but typically lacks workflow-level replay semantics and state-transition awareness.


Additional context

One especially interesting direction could be replay-with-perturbations:

  • modified timing
  • retry injection
  • concurrent state mutation scenarios

This could help surface hidden workflow assumptions and concurrency/retry pathologies in production systems.

The direction feels increasingly relevant for reliability engineering around autonomous or long-running workflows.


🤖 AI Disclosure
  • [x] I acknowledge that an LLM was used in the creation of this Issue, in accordance with Hatchet's AI_POLICY.md.

  • Details: brainstorming, structuring the feature request, refining wording

TheEleventhAvatar avatar May 20 '26 14:05 TheEleventhAvatar

Hi @TheEleventhAvatar, thank you for the detailed write-up. I think this will be easier for the maintainers to triage if it is split into multiple scoped feature requests. For example, this could potentially be broken into separate issues around:

  • improved retry chain and state transition visibility for a run
  • comparing two workflow runs and showing task-level differences or divergence points
  • clearer replay safety and idempotency guidance or execution metadata
  • replaying from checkpoints with modified timing or state
  • dashboard or CLI affordances for debugging replayed runs

There are a lot of good ideas here. Thank you for putting so much effort into this.

BloggerBust avatar May 20 '26 19:05 BloggerBust

This issue has been stale for 90 days. Please update the issue or comment to keep it active. Otherwise, it will be closed in 5 days.

github-actions[bot] avatar Aug 19 '26 08:08 github-actions[bot]