#14391: feat(cron): add raw delivery mode for verbatim output
docs
app: macos
app: web-ui
gateway
stale
Cluster:
Cron Job Enhancements
## Summary
- Adds `delivery.mode = "raw"` for isolated cron jobs that delivers agent output verbatim via outbound channel adapters, bypassing the announce summarizer
- When `mode = "announce"`, cron output is passed to the main agent with instructions to summarize to 1-2 sentences — this drops detailed content like questions or structured status reports
- `"raw"` mode routes through the same `deliverOutboundPayloads` path already used for structured content (media/channelData), but now also available for plain text
## Motivation
Cron jobs like heartbeats may produce output that should reach the user exactly as written (e.g., status updates with questions, detailed reports). The announce summarizer condenses these to 1-2 sentences, losing important content. A `"raw"` mode gives operators control over when summarization is appropriate.
## Changes
- `src/cron/types.ts`: Add `"raw"` to `CronDeliveryMode` union
- `src/gateway/protocol/schema/cron.ts`: Add `"raw"` to delivery schema + patch schema
- `src/cron/delivery.ts`: Handle `"raw"` in mode resolution and mark as `requested`
- `src/cron/isolated-agent/run.ts`: Route `"raw"` to direct `deliverOutboundPayloads` path
- `ui/src/ui/types.ts`, `ui-types.ts`, `views/cron.ts`: Add `"raw"` to UI types and dropdown
- `apps/macos/Sources/OpenClaw/CronModels.swift`, `CronJobEditor.swift`: Add `raw` case to Swift enums
- `docs/automation/cron-jobs.md`, `docs/zh-CN/automation/cron-jobs.md`: Document new mode
## Test plan
- [x] TypeScript compiles cleanly (`tsc --noEmit`)
- [x] All 107 cron tests pass (`vitest run src/cron/`)
- [x] Protocol conformance test passes (UI + Swift include all delivery modes)
- [ ] Manual: create isolated cron job with `delivery.mode: "raw"`, verify output delivered verbatim
- [ ] Manual: verify `"announce"` mode still summarizes as before
🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
This PR adds a new cron `delivery.mode = "raw"` option across gateway schema, server cron delivery resolution, isolated-agent execution, UI types/UI dropdown, and macOS Swift models/docs.
On the server side, `resolveCronDeliveryPlan` now recognizes `raw` and treats it as a “requested” delivery mode, and isolated cron runs route `raw` (and structured payloads) through `deliverOutboundPayloads` to bypass the announce summarizer.
Key issues to address before merge are in the macOS CronJobEditor UI (new enum case isn’t actually selectable and related fields stay hidden) and in the isolated-agent prompt construction (raw mode still appends “Return your summary…” instructions, which undermines verbatim delivery).
<h3>Confidence Score: 4/5</h3>
- Mostly safe to merge once the macOS UI and raw-mode prompt behavior are corrected.
- The change is largely additive and consistently threaded through types/schemas, but there are two concrete behavior mismatches: the macOS editor cannot actually set `raw` (and hides required fields), and the isolated-agent prompt still instructs the agent to summarize even in raw mode, which conflicts with verbatim delivery semantics.
- apps/macos/Sources/OpenClaw/CronJobEditor.swift, src/cron/isolated-agent/run.ts
<!-- greptile_other_comments_section -->
<sub>(3/5) Reply to the agent's comments like "Can you suggest a fix for this @greptileai?" or ask follow-up questions!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#19998: macOS: harden cron editor updates and compatibility
by tobiasbischoff · 2026-02-18
78.7%
#13383: fix(cron): route text-only payloads through direct delivery
by Masha-L · 2026-02-10
77.8%
#13694: feat(cron): structured output via responseSchema for isolated agent...
by JordanCoin · 2026-02-10
76.0%
#6522: fix(cron): deliver original message when agent response is heartbea...
by sidmohan0 · 2026-02-01
75.6%
#11216: Fix nightly failures: cron webchat delivery result + media cleanup ...
by DeanoC · 2026-02-07
75.6%
#8097: fix: auto-convert one-shot reminders for reliable delivery
by Gerrald12312 · 2026-02-03
74.3%
#18743: Cron Tool Hardening: Normalize Gateway Params and Enforce Valid Sch...
by cccat6 · 2026-02-17
74.0%
#22609: feat(cron): add directText flag for text message dilivery and histo...
by bydsky · 2026-02-21
74.0%
#21014: fix(cron): suppress main-session summary for HEARTBEAT_OK responses
by nickjlamb · 2026-02-19
73.5%
#23329: feat: Add Markdown support for cron job payload
by HeXavi8 · 2026-02-22
73.5%