-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
Bug: partialArgs JSON duplication in agentTurn cron jobs with isolated sessionTarget #53852
Copy link
Copy link
Open
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.staleMarked as stale due to inactivityMarked as stale due to inactivity
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.staleMarked as stale due to inactivityMarked as stale due to inactivity
Type
Fields
Priority
None yet
Bug Description
When running cron jobs with
payload.kind: "agentTurn"andsessionTarget: "isolated", the tool callpartialArgsfield contains malformed JSON due to duplicate content concatenation.Error Message
Actual vs Expected Behavior
Expected (valid JSON):
Actual (malformed JSON):
The same JSON object is being concatenated twice, creating invalid JSON.
Affected Versions
2026.1.30(confirmed)2026.3.23-2(confirmed - latest stable)Reproduction Steps
Create a cron job with:
sessionTarget: "isolated"payload.kind: "agentTurn"read,exec,sessions_history)Wait for cron to trigger
Observe the error in the response
Example Cron Job That Triggers This
{ "name": "Example research job", "schedule": {"kind": "cron", "expr": "0 9 * * *", "tz": "America/New_York"}, "sessionTarget": "isolated", "payload": { "kind": "agentTurn", "message": "Read a file: read({\"path\": \"/some/file.md\"})", "model": "openrouter/moonshotai/kimi-k2.5", "timeoutSeconds": 120 } }Observed Patterns
agentTurncron jobs withsessionTarget: "isolated"systemEventjobs or main session interactionsread,exec,sessions_history)Suspected Code Location
Based on error traces, likely in the gateway's tool call serialization for isolated sessions:
gateway-cli-Dsd9gHBa.js(minified)partialJsonis handledImpact
Workaround
Disable
agentTurncron jobs withsessionTarget: "isolated"until fixed, or convert tosystemEventtype jobs if they don't require isolated execution.