Skip to content

fix(cron): preserve isolated agent turn payload message#91230

Merged
clawsweeper[bot] merged 2 commits into
openclaw:mainfrom
849261680:fix/91228-cron-agentturn-message
Jun 8, 2026
Merged

fix(cron): preserve isolated agent turn payload message#91230
clawsweeper[bot] merged 2 commits into
openclaw:mainfrom
849261680:fix/91228-cron-agentturn-message

Conversation

@849261680

@849261680 849261680 commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Keep isolated cron agent prompts sourced from the canonical agentTurn payload message instead of the duplicated dispatch message field.
  • Cover the regression where a malformed dispatch message would otherwise stringify to [object Object] before reaching the isolated agent prompt.
  • Add service coverage proving SQLite-rehydrated agentTurn jobs pass the configured payload message into isolated manual runs.

Fixes #91228

Verification

  • node scripts/run-vitest.mjs src/cron/isolated-agent/run.payload-fallbacks.test.ts
  • node scripts/run-vitest.mjs src/cron/store.test.ts src/cron/service/ops.regression.test.ts src/cron/isolated-agent/run*.test.ts
  • node_modules/.bin/oxfmt --check src/cron/isolated-agent/run.ts src/cron/isolated-agent/run.payload-fallbacks.test.ts src/cron/service/ops.regression.test.ts
  • git diff --check -- src/cron/isolated-agent/run.ts src/cron/isolated-agent/run.payload-fallbacks.test.ts src/cron/service/ops.regression.test.ts
  • .agents/skills/autoreview/scripts/autoreview --mode commit --commit HEAD -> clean, no accepted/actionable findings

Real behavior proof

Behavior addressed: Isolated agentTurn cron runs now build the prompt from the persisted job.payload.message string, so a malformed duplicated dispatch message cannot become [object Object] in the LLM prompt.
Real environment tested: Local macOS checkout at a4464dacc4 using a temporary OPENCLAW_STATE_DIR, the real OpenClaw SQLite cron store, and the real cron service cron.run boundary.
Exact steps or command run after this patch: OPENCLAW_STATE_DIR=/tmp/openclaw-91228-proof.<redacted>/state node_modules/.bin/tsx <temporary proof script>
Evidence after fix: Terminal output from the real OpenClaw cron store/service path:

{
  "openclawHead": "a4464dacc4",
  "stateDir": "/tmp/openclaw-91228-proof.<redacted>/state",
  "persistedPayloadType": "string",
  "persistedPayloadMessage": "SERIALIZATION_PROBE: reply exactly with the marker token you received and nothing else.",
  "runResult": {
    "ok": true,
    "ran": true
  },
  "observedDispatchType": "string",
  "observedDispatchMessage": "SERIALIZATION_PROBE: reply exactly with the marker token you received and nothing else.",
  "containsObjectObject": false
}

Observed result after fix: A real SQLite-backed cron job persisted payload.message as a string, cron.run returned { ok: true, ran: true }, and the isolated runner dispatch boundary observed the exact SERIALIZATION_PROBE string with containsObjectObject: false.
What was not tested: I did not run a live provider-backed cron job against Anthropic/Claude; this patch is covered at the scheduler, SQLite rehydration, and isolated runner prompt-construction boundaries.

@openclaw-barnacle openclaw-barnacle Bot added size: S triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels Jun 7, 2026
@clawsweeper

clawsweeper Bot commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Codex review: passed. Reviewed June 7, 2026, 10:22 PM ET / 02:22 UTC.

Summary
The PR changes isolated cron agent prompt construction to read agentTurn text from job.payload.message and adds regression coverage for malformed dispatch messages plus SQLite-rehydrated manual runs.

PR surface: Source +8, Tests +60. Total +68 across 3 files.

Reproducibility: yes. source-level: current main interpolates input.message into the isolated cron prompt, so a malformed non-string dispatch value stringifies to [object Object]. The linked release report supplies operator repro evidence; I did not run it locally because this review is read-only.

Review metrics: none identified.

Merge readiness
Overall: 🦞 diamond lobster
Proof: 🦞 diamond lobster
Patch quality: 🦞 diamond lobster
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Next step before merge

  • [P2] No repair lane is needed because I found no actionable patch defect; existing automerge and exact-head checks can decide landing.

Security
Cleared: The diff touches cron prompt construction and tests only; I found no dependency, workflow, secret-handling, or external-hook wrapping regression.

Review details

Best possible solution:

Land this narrow cron fix after normal exact-head CI and automerge gates; keep payload.message as the canonical agentTurn prompt source.

Do we have a high-confidence way to reproduce the issue?

Yes, source-level: current main interpolates input.message into the isolated cron prompt, so a malformed non-string dispatch value stringifies to [object Object]. The linked release report supplies operator repro evidence; I did not run it locally because this review is read-only.

Is this the best way to solve the issue?

Yes. Resolving agentTurn prompt text from job.payload.message inside prepareCronRunContext is the narrowest maintainable fix because the payload type and caller paths already define that field as canonical.

AGENTS.md: found and applied where relevant.

Codex review notes: model gpt-5.5, reasoning high; reviewed against 9caff5f873cd.

Label changes

Label justifications:

  • P1: The PR fixes a reported regression where isolated agentTurn cron jobs can silently send [object Object] instead of the configured prompt.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 🚀 automerge armed: This PR is in ClawSweeper's automerge lane. Sufficient (terminal): The PR body includes redacted terminal output from a real temporary state dir using the OpenClaw SQLite cron store and cron.run boundary, with the same relevant fix still present on current head.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes redacted terminal output from a real temporary state dir using the OpenClaw SQLite cron store and cron.run boundary, with the same relevant fix still present on current head.
Evidence reviewed

PR surface:

Source +8, Tests +60. Total +68 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 1 11 3 +8
Tests 2 60 0 +60
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 71 3 +68

What I checked:

Likely related people:

  • Peter Steinberger: git blame ties the current main prompt construction, timer dispatch, and SQLite payload codec lines to commit 6f2b3830f1, authored by Peter Steinberger. (role: recent area contributor; confidence: high; commits: 6f2b3830f128; files: src/cron/isolated-agent/run.ts, src/cron/service/timer.ts, src/cron/store/payload-codec.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@openclaw-barnacle openclaw-barnacle Bot added proof: supplied External PR includes structured after-fix real behavior proof. and removed triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels Jun 7, 2026
@clawsweeper clawsweeper Bot added 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. P1 High-priority user-facing bug, regression, or broken workflow. labels Jun 7, 2026
@Takhoffman

Copy link
Copy Markdown
Contributor

@clawsweeper automerge

@clawsweeper

clawsweeper Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

🦞✅
ClawSweeper merged this PR after the passing review.

Source: clawsweeper[bot]
Feedback: structured ClawSweeper verdict: pass (sha=4d33607efdb083aaa3b9e6c9f5ca95c5c154182b)
Merge status: merged by ClawSweeper automerge
Merged at: 2026-06-08T02:23:03Z
Merge commit: 4780546c124d

What merged:

  • The PR changes isolated cron agent prompt construction to read agentTurn text from job.payload.message and adds regression coverage for malformed dispatch messages plus SQLite-rehydrated manual runs.
  • PR surface: Source +8, Tests +60. Total +68 across 3 files.
  • Reproducibility: yes. source-level: current main interpolates input.message into the isolated cron prompt, ... release report supplies operator repro evidence; I did not run it locally because this review is read-only.

Automerge notes:

  • PR branch already contained follow-up commit before automerge: fix(cron): preserve isolated agent turn payload message

The automerge loop is complete.

Automerge progress:

  • 2026-06-08 01:49:21 UTC review queued a4464dacc4d4 (queued)
  • 2026-06-08 01:56:39 UTC review passed a4464dacc4d4 (structured ClawSweeper verdict: pass (sha=a4464dacc4d4eae37cdcaa1d229f6c932f3e4...)
  • 2026-06-08 02:16:03 UTC review queued 4d33607efdb0 (after repair)
  • 2026-06-08 02:22:35 UTC review passed 4d33607efdb0 (structured ClawSweeper verdict: pass (sha=4d33607efdb083aaa3b9e6c9f5ca95c5c1541...)
  • 2026-06-08 02:23:04 UTC merged 4d33607efdb0 (merged by ClawSweeper automerge)

@clawsweeper clawsweeper Bot added clawsweeper:automerge Maintainer opted this PR into bounded ClawSweeper-reviewed automerge rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 🚀 automerge armed This PR is in ClawSweeper's automerge lane. and removed 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. labels Jun 8, 2026
@clawsweeper clawsweeper Bot force-pushed the fix/91228-cron-agentturn-message branch from a4464da to 4d33607 Compare June 8, 2026 02:16
@clawsweeper clawsweeper Bot merged commit 4780546 into openclaw:main Jun 8, 2026
157 checks passed
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jun 8, 2026
Summary:
- The PR changes isolated cron agent prompt construction to read agentTurn text from `job.payload.message` and adds regression coverage for malformed dispatch messages plus SQLite-rehydrated manual runs.
- PR surface: Source +8, Tests +60. Total +68 across 3 files.
- Reproducibility: yes. source-level: current main interpolates `input.message` into the isolated cron prompt, ... release report supplies operator repro evidence; I did not run it locally because this review is read-only.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix(cron): preserve isolated agent turn payload message

Validation:
- ClawSweeper review passed for head 4d33607.
- Required merge gates passed before the squash merge.

Prepared head SHA: 4d33607
Review: openclaw#91230 (comment)

Co-authored-by: 宇宙熊Yzx <53250620+849261680@users.noreply.github.com>
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com>
Approved-by: takhoffman
Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clawsweeper:automerge Maintainer opted this PR into bounded ClawSweeper-reviewed automerge P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: supplied External PR includes structured after-fix real behavior proof. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: S status: 🚀 automerge armed This PR is in ClawSweeper's automerge lane.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Regression] cron agentTurn payload delivers [object Object] to LLM on 2026.6.1 (regression of #54579)

2 participants