Repository navigation
Description
Note on prior filing
This was filed yesterday as #91228 with the same content. That issue received correct triage from clawsweeper[bot] (P1, impact:message-loss, platinum hermit rating, needs-live-repro), but was then auto-closed and locked 28 seconds later by openclaw-barnacle[bot] under an r: moltbook label that does not match the issue content. The closed/locked state prevents commenting or reopening from the reporter side. I do not have a Moltbook surface or any Moltbook-related code involved in this report — the regression is a pure cron-isolated-agentTurn payload serialization bug. Refiling here so the bug remains visible to maintainers. Cross-ref to the locked filing: #91228.
Summary
The bug fixed in #54579 has regressed on 2026.6.1. Every cron job with payload.kind: "agentTurn" and sessionTarget: "isolated" receives the literal string [object Object] as the agent prompt instead of the configured payload.message. The scheduler still reports the run as status=ok (the agent didn't crash, it just gave up on garbage input), so this is a silent failure — operators only notice when downstream work stops happening.
I went looking for #54579 after a week of nightly cron silence on a workspace that worked fine on 2026.5.20.
Environment
- OpenClaw: 2026.6.1 (commit `2e08f0f`, fresh install via `npm i -g openclaw@2026.6.1`)
- Host: Ubuntu 24.04 (x64), Node v22.22.2
- Provider: `claude-max` (Anthropic OAuth via local proxy at 127.0.0.1:3456)
- Previous working version: 2026.5.20 (same workspace, same cron jobs — was fine)
Reproduction (minimal, deterministic)
```jsonc
// via MCP cron add
{
"name": "test-payload-serialization",
"schedule": { "kind": "cron", "expr": "0 4 1 1 *", "tz": "America/New_York" },
"payload": {
"kind": "agentTurn",
"message": "SERIALIZATION_PROBE: reply exactly with the marker token you received and nothing else.",
"model": "claude-haiku-4-5",
"timeoutSeconds": 60
},
"delivery": { "mode": "none" },
"sessionTarget": "isolated"
}
```
Then force-run via `cron run` (MCP) or `openclaw cron run `.
Expected: agent receives `SERIALIZATION_PROBE: reply exactly...` and complies.
Actual: agent's summary (recorded in `~/.openclaw/cron/runs/.jsonl`):
```
Your message came through as `[object Object]` — looks like a serialization glitch on the way in.
What did you mean to send?
```
The persisted payload in `jobs.json` is correct — `payload.message` is a string. `cron get` echoes it back as a string. The corruption happens between scheduler dispatch and the prompt-assembly in the isolated agent session.
Confirmation
| Check | Result |
|---|---|
| `jobs.json` has `payload.message` as a string | ✓ confirmed |
| `cron get` returns `payload.message` as a string | ✓ confirmed |
| Run record in `runs/.jsonl` shows agent received `[object Object]` | ✓ confirmed |
| Repros on a brand-new cron added post-upgrade | ✓ confirmed (not a stale-state issue) |
| Repros for both `claude-max/claude-haiku-4-5` and `anthropic/claude-haiku-4-5` | ✓ confirmed |
Code pointer (dist, since src is not shipped)
The symptom site is the template literal in `dist/isolated-agent-Cw8sZTVo.js:641`:
```js
const base = `[cron:${input.job.id} ${input.job.name}] ${input.message}`.trim();
```
If `input.message` is an object, this produces `[object Object]`.
The upstream call sites all appear to pass `job.payload.message` straight through:
- `dist/server-cron-CJwAiILI.js:1711` — `message: job.payload.message`
- `dist/server-cron-CJwAiILI.js:3026-3034` — `runIsolatedAgentJob` → `runCronIsolatedAgentTurn({ ...message })`
- `dist/isolated-agent-Cw8sZTVo.js:986` — `prepareCronRunContext({ input: params })`
Since the persisted `payload.message` is a string and the final template literal sees an object, the wrap is happening either (a) in the cron run-dispatch layer that constructs the `job` shape from the SQLite-backed store rehydration (cf. #90378's SQLite migration), or (b) in a wrapper added recently around `payload.message` that's not unwrapped at the consumer. I haven't been able to fully isolate this from minified dist alone.
History / Related
- Originally filed as Cron agentTurn payload delivers [object Object] to LLM instead of message string #54579 (closed 2026-03-26, fixed before 2026.4.x).
- Regression now visible on 2026.6.1 — likely related to the cron→SQLite migration described in [Bug] Upgrading from 5.28 → 6.1: cron store migrated to SQLite silently, but new jobs default to delivery.mode=announce causing channel errors #90378 (also on 2026.6.1).
- May also be related to Bug: partialArgs JSON duplication in agentTurn cron jobs with isolated sessionTarget #53852 (`partialArgs` JSON duplication on isolated agentTurn cron) — both touch the agentTurn isolated dispatch path.
Workaround
Migrated the affected job to a system crontab entry invoking the same bash chain directly. Bypasses the agentTurn dispatch entirely. Confirmed working since 2026-06-07.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
clawsweeper commentedon Jun 8, 2026
Thanks for the context here. I did a careful shell check against current
main, and this is already implemented.Current main already fixes the reported release regression: isolated cron agentTurn prompt assembly now reads the canonical persisted
job.payload.message, and regression tests cover both malformed dispatch input and SQLite-rehydrated manual runs. The fix is main-only after v2026.6.1, so the issue should close as implemented on main rather than queue another repair.I found the merged PR that appears to have closed this: #91230: fix(cron): preserve isolated agent turn payload message.
So I’m closing this as already implemented rather than keeping a duplicate issue open.
Review details
Best possible solution:
Keep the current-main fix from #91230 and let the next release carry it; separate cron store migration or delivery-default problems should remain tracked in their own issues.
Do we have a high-confidence way to reproduce the issue?
Yes for the release regression: v2026.6.1 source interpolates
input.messageinto the isolated cron prompt, matching the reported[object Object]symptom when dispatch passes a wrapped object. Current main no longer has that source path.Is this the best way to solve the issue?
Yes: resolving agentTurn prompt text from canonical
job.payload.messageis the narrow durable fix, and the tests cover both malformed dispatch input and the SQLite-rehydrated manual-run path.Security review:
Security review: This is an issue triage review with no proposed patch and no security-sensitive report.
AGENTS.md: found and applied where relevant.
What I checked:
payload.kind: "agentTurn"withsessionTarget: "isolated", where persistedpayload.messageremains a string but the isolated agent receives[object Object].input.job.payload.messagebefore building the cron prompt, so a wrapped or malformed dispatchinput.messageis no longer interpolated into the LLM prompt. (src/cron/isolated-agent/run.ts:459, 439dcbde3b1f)[object Object]. (src/cron/isolated-agent/run.payload-fallbacks.test.ts:42, 439dcbde3b1f)runIsolatedAgentJobreceives the original marker message. (src/cron/service/ops.regression.test.ts:267, 439dcbde3b1f)fix(cron): preserve isolated agent turn payload message. (src/cron/isolated-agent/run.ts:459, 4780546c124d)job.payload.messagewith regression coverage for malformed dispatch messages and SQLite-rehydrated manual runs. (4780546c124d)Likely related people:
resolveCronAgentTurnMessageand the two regression tests for this exact payload-preservation bug. (role: fix author / recent cron contributor; confidence: high; commits: 4780546c124d; files:src/cron/isolated-agent/run.ts,src/cron/isolated-agent/run.payload-fallbacks.test.ts,src/cron/service/ops.regression.test.ts)src/cron/isolated-agent/run.ts,src/cron/service/ops.regression.test.ts)src/cron/isolated-agent/run.ts,src/cron/service/timer.ts,src/cron/store/payload-codec.ts)Codex review notes: model gpt-5.5, reasoning high; reviewed against 439dcbde3b1f; fix evidence: merged PR #91230, commit 4780546c124d, main fix timestamp 2026-06-08T02:23:02Z.