← Back to PRs

#14391: feat(cron): add raw delivery mode for verbatim output

by therealZpoint-bot open 2026-02-12 02:03 View on GitHub →
docs app: macos app: web-ui gateway stale
## 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