Skip to content

fix: explain when a previous automation run keeps the agent from starting - #207180

Merged
vyctorbrzezowski merged 7 commits into
mainfrom
openclaw/automation-session-error-copy-e346
Nov 28, 2026
Merged

vyctorbrzezowski merged 7 commits into
mainfrom
openclaw/automation-session-error-copy-e346

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

A recurring automation can fail before its agent starts when OpenClaw confuses the new run with work from the previous run. The saved error asked for a “physical store scope,” even when the job already had one. It didn’t tell the person whether the agent had started or what kept it from starting.

User Impact

Before: “Session controller identity requires a physical store scope”

After, when the previous run still holds the conflicting work: “The agent didn’t start because work from the previous run was still active. Wait a moment, then try running it again.”

After, when a conflict prevented startup but can’t be attributed to the previous run: “The agent didn’t start because OpenClaw found conflicting session records for this run. Wait a moment, then try running it again.”

After, outside automation startup: “OpenClaw found conflicting session records and couldn’t tell which session to use. Try again in a moment.”

New failures show the explanation in Error details and activity history. Already-saved failures keep their original wording. This changes what a failure says, not which runs succeed. #207148 addresses one cause of the overlap separately.

Why This Change Was Made

Automation preparation knows that the agent hasn’t started. It names the previous run only if outstanding work belongs to that exact run’s session, not merely because the same session controller was involved. Other callers don’t make claims about the automation. Session matching, the active-run refusal, scheduling, and the diagnostic warning are unchanged.

Evidence

  • Ran three occurrences of a synthetic Morning briefing job through an isolated scheduler with its real occurrence admission, session store, and run history. The first occurrence finished. The harness then held its session to simulate remaining work. The second failed before a model call. After the harness released that work, clicking Run now in the real Control UI sent one forced-run request. The fixture transport forwarded those exact parameters to the scheduler and the third occurrence succeeded. Simulated model calls: 1, 0, 1. The failed history entry remained; the saved job’s latest error cleared.
  • The first occurrence already showed Completed while the fixture held its session. That label doesn’t establish that it’s safe to retry immediately, so the error doesn’t recommend a blind retry or a settings change.
  • Both new copy expectations failed on the prior wording. An additional negative control held unrelated work on the previous run’s original controller; the revised error does not blame the previous run. All 24 tests in the affected cron state file, the separate isolated-run reproduction, and all 17 controller identity tests passed. Four browser cases covered both new explanations and both historical wordings. Review run selected the stored record without running or editing a job.
  • Scoped typecheck, lint, format, and copy checks passed. No production automation or live provider was used; full CI was not run locally. The coordinating session reviewed the full five-file diff and found no actionable issues. This was source review, not an independent automated review.

Matched Chromium captures: the same synthetic job, light theme, 1100 × 720. Before: fd1942854a6b. After: f9d4fd4fa724.

Clean comparison

Before

Saved error asks for a physical store scope

After

The error says the agent did not start and identifies unfinished work from the previous run

Annotated comparison

Before

The saved storage wording is highlighted

After

The previous run’s work and the unstarted agent are highlighted

When the previous run is not the cause

Conflicting session records kept the agent from starting; no previous run is named

Annotated fallback, isolated-scheduler history, and the Run now recovery check

Skill in practice

The OpenClaw writing skill calls for both the known cause and the status of the reader’s work. Here, naming the previous run requires evidence from that run, and the agent’s startup status comes from the point where preparation failed.

Reported by @vyctorbrzezowski.

Work sessions

Linked for team reference; these sessions aren’t public.

Worked on by

roboclaw-bot and others added 2 commits November 28, 2026 03:19
Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: ae02d6c0-57fb-48a2-9d4d-2ccb1e483322
@clawsweeper

clawsweeper Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@roboclaw-bot

roboclaw-bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Collaborator Author

The matched comparisons show the same synthetic Morning briefing job in the real Control UI (1100 × 720, light theme). Before: main at fd1942854a6b. After: f9d4fd4fa724. This is an explanation of the failure, not a fix for what blocked the run.

Clean comparison

Before

Saved error asks for a physical store scope

After

The error says the agent did not start and identifies unfinished work from the previous run

Annotated comparison

Before

The saved storage wording is highlighted

After

The previous run’s work and the unstarted agent are highlighted

When the previous run is not the cause

Clean

Conflicting session records kept the agent from starting; no previous run is named

Annotated

The session conflict and the unstarted agent are highlighted

What happened after the previous work settled

The failed run appears above a previous run already marked Completed

This last frame uses history from the isolated scheduler. The first run finished, then the harness held its session to simulate unfinished work. The second failed before a model call. After the harness released the work, clicking Run now sent one forced-run request through the fixture transport to the scheduler. It completed a third run: 1, 0, 1 model calls. The saved job’s latest error cleared and the failed history entry remained unchanged. The Completed row in the screenshot is not a signal that another run can safely start immediately.

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. impact:ux-friction User-facing flow adds avoidable confusion or support burden without fully blocking progress. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Nov 28, 2026
@clawsweeper

clawsweeper Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: stale review; fresh review needed.

Summary
The latest durable ClawSweeper review was for head 6503fbb267438c0cdb75aa062482a7228cb93bee, but the PR head is now aff80dddee85177f3c8e704a5ce24020d31161c9. Its old verdict and PR readiness labels are no longer current.

Next step
Comment @clawsweeper re-review when the current head is ready; pushes after the first review are not reviewed automatically.

Review history (1 earlier review cycle)
  • reviewed 2026-11-28T03:39:42.883Z sha 6503fbb :: passed. :: none

roboclaw-bot and others added 2 commits November 28, 2026 03:58
…s the agent from starting

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: fefe9614-d530-419c-9b63-8fa35e8e0e49
@roboclaw-bot roboclaw-bot changed the title fix: explain when OpenClaw can’t tell which session to use fix: explain when a previous automation run keeps the agent from starting Nov 28, 2026
@clawsweeper clawsweeper Bot removed proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. labels Nov 28, 2026
@vyctorbrzezowski
vyctorbrzezowski merged commit 7e90833 into main Nov 28, 2026
6 checks passed
@vyctorbrzezowski
vyctorbrzezowski deleted the openclaw/automation-session-error-copy-e346 branch November 28, 2026 07:34
vincentkoc added a commit that referenced this pull request Nov 28, 2026
* commit '262f14aab89ca286633992760fa45aeeded998f9': (207 commits)
  fix(ui): remove redundant type argument from Board browser test (#207352)
  test(channels): distinguish status and batch fixtures (#207232)
  fix(ui): type the Board drop test mock as void (#207348)
  fix(ui): break the Skill Workshop import cycle (#207345)
  test(channels): expose label guard regressions (#207195)
  fix: explain when a previous automation run keeps the agent from starting (#207180)
  refactor(test): consolidate loader proof and repair rollback coverage (#207152)
  fix(agents): one tool-result bound on every route, untrusted-content wrapper intact (#207101)
  test(plugins): verify staged SDK named exports (#207170)
  fix(ui): truncate empty Compose hints on narrow screens (#207301)
  fix: keep unsent Cmd+K Compose drafts when reopened (#207307)
  fix: explain chat update errors when a session changes (#206419)
  fix(ios): keep consecutive commands on one line in chat (#207242)
  fix(ios): keep connection messages from flashing when chat reopens (#207233)
  fix(ios): give Sessions groups more breathing room (#207221)
  fix(ui): show chat completions as activity rows (#201891)
  fix(ui): make empty composer hints look distinct from drafts (#207295)
  fix: explain why chat won’t attach an empty file (#206402)
  fix(agents): show Doctor's restore-first warning before deleting a held store (#207290)
  test(channels): fix join failure proof and trim probe fixture (#207264)
  ...
vincentkoc added a commit that referenced this pull request Nov 28, 2026
* commit '262f14aab89ca286633992760fa45aeeded998f9': (207 commits)
  fix(ui): remove redundant type argument from Board browser test (#207352)
  test(channels): distinguish status and batch fixtures (#207232)
  fix(ui): type the Board drop test mock as void (#207348)
  fix(ui): break the Skill Workshop import cycle (#207345)
  test(channels): expose label guard regressions (#207195)
  fix: explain when a previous automation run keeps the agent from starting (#207180)
  refactor(test): consolidate loader proof and repair rollback coverage (#207152)
  fix(agents): one tool-result bound on every route, untrusted-content wrapper intact (#207101)
  test(plugins): verify staged SDK named exports (#207170)
  fix(ui): truncate empty Compose hints on narrow screens (#207301)
  fix: keep unsent Cmd+K Compose drafts when reopened (#207307)
  fix: explain chat update errors when a session changes (#206419)
  fix(ios): keep consecutive commands on one line in chat (#207242)
  fix(ios): keep connection messages from flashing when chat reopens (#207233)
  fix(ios): give Sessions groups more breathing room (#207221)
  fix(ui): show chat completions as activity rows (#201891)
  fix(ui): make empty composer hints look distinct from drafts (#207295)
  fix: explain why chat won’t attach an empty file (#206402)
  fix(agents): show Doctor's restore-first warning before deleting a held store (#207290)
  test(channels): fix join failure proof and trim probe fixture (#207264)
  ...
vincentkoc added a commit that referenced this pull request Nov 28, 2026
* commit '262f14aab89ca286633992760fa45aeeded998f9': (207 commits)
  fix(ui): remove redundant type argument from Board browser test (#207352)
  test(channels): distinguish status and batch fixtures (#207232)
  fix(ui): type the Board drop test mock as void (#207348)
  fix(ui): break the Skill Workshop import cycle (#207345)
  test(channels): expose label guard regressions (#207195)
  fix: explain when a previous automation run keeps the agent from starting (#207180)
  refactor(test): consolidate loader proof and repair rollback coverage (#207152)
  fix(agents): one tool-result bound on every route, untrusted-content wrapper intact (#207101)
  test(plugins): verify staged SDK named exports (#207170)
  fix(ui): truncate empty Compose hints on narrow screens (#207301)
  fix: keep unsent Cmd+K Compose drafts when reopened (#207307)
  fix: explain chat update errors when a session changes (#206419)
  fix(ios): keep consecutive commands on one line in chat (#207242)
  fix(ios): keep connection messages from flashing when chat reopens (#207233)
  fix(ios): give Sessions groups more breathing room (#207221)
  fix(ui): show chat completions as activity rows (#201891)
  fix(ui): make empty composer hints look distinct from drafts (#207295)
  fix: explain why chat won’t attach an empty file (#206402)
  fix(agents): show Doctor's restore-first warning before deleting a held store (#207290)
  test(channels): fix join failure proof and trim probe fixture (#207264)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 29, 2026
…ting (openclaw#207180)

* fix: explain when OpenClaw can’t tell which session to use

Co-authored-by: vyctorbrzezowski <[email protected]>

* fix: explain when OpenClaw can’t tell which session to use

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: ae02d6c0-57fb-48a2-9d4d-2ccb1e483322

* fix: say when a previous automation run kept the agent from starting

Co-authored-by: vyctorbrzezowski <[email protected]>

* fix: explain when unfinished work from a previous automation run keeps the agent from starting

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: fefe9614-d530-419c-9b63-8fa35e8e0e49

* fix(cron): add recovery guidance to automation session conflict errors

* fix(cron): address previous-run work by its session key

---------

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: vyctorbrzezowski <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

impact:ux-friction User-facing flow adds avoidable confusion or support burden without fully blocking progress. P2 Normal backlog priority with limited blast radius. size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants