Skip to content

Record the step a run is executing on its record, cleared when the step ends (1.8.0) - #64

Merged
pallaoro merged 2 commits into
mainfrom
flow-run-records-running-step
Nov 4, 2026
Merged

pallaoro merged 2 commits into
mainfrom
flow-run-records-running-step

Conversation

@pallaoro

@pallaoro pallaoro commented Nov 4, 2026

Copy link
Copy Markdown
Member

Why

A run's trace gains an entry only when a step ends. While a step runs, a reader of the run record sees status: "running" and nothing about what the run is doing, how long the step has taken, or what it is waiting on. An agent step that waits for a busy session looks the same as one making progress.

What changes

  • The run record carries running while a top-level step executes: the step's name and type, when it started, its per-attempt timeout, and for an agent step the resolved session it runs in (agent, sessionKey, sessionId, after template interpolation).
  • It is written just before the step starts and cleared in the same write that records the step's end, whether the step completes, pauses for approval, or fails.
  • New exported type RunningStep.
  • Version 1.8.0.

Sub-flows (loop iterations, branches) record their own running step in their own records; the parent shows the loop or branch step itself.

Checks

  • npm test: 249 of 249 pass, 2 of them new (recorded while running with the resolved session, cleared after success and after failure). The tests stub the openclaw CLI.
  • tsc --noEmit is clean.

This branch is independent of #63; both bump the version, so whichever merges second takes the higher one.

…ep ends (1.8.0)

The trace gains an entry only when a step ends, so a running flow showed nothing about what it was doing. The run record now carries running: the step's name and type, when it started, its per-attempt timeout, and for an agent step the resolved session it runs in. Each exit from a step clears it in the same write that records the step's end.
…ing-step

# Conflicts:
#	package-lock.json
#	package.json
#	tests/core.test.ts
@pallaoro
pallaoro merged commit 59285ea into main Nov 4, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant