#21485: feat(cron): add direct-text flag to deliver text message directly [AI-assisted]
app: web-ui
gateway
cli
size: XS
Cluster:
Cron Job Enhancements
## Summary
- Problem: add direct-text flag to deliver text message directly
- Why it matters: For text-only results, cron uses the subagent announce flow to deliver a user-facing update rather than raw output. This path intentionally asks the main agent to “convert the result into your normal assistant voice”, which tends to summarize.
- What changed: add direct-text flag to deliver text message directly, skip subagent announce flow
- What did NOT change (scope boundary):
## AI-assisted
- Prompt: add a flag to delivers text payloads directly without the announce conversion path
## Change Type (select all)
- [ ] Bug fix
- [x ] Feature
- [ ] Refactor
- [ ] Docs
- [ ] Security hardening
- [ ] Chore/infra
## Scope (select all touched areas)
- [x ] Gateway / orchestration
- [ ] Skills / tool execution
- [ ] Auth / tokens
- [ ] Memory / storage
- [ ] Integrations
- [ ] API / contracts
- [ ] UI / DX
- [ ] CI/CD / infra
## Security Impact (required)
- New permissions/capabilities? (`No`)
- Secrets/tokens handling changed? (`No`)
- New/changed network calls? (`No`)
- Command/tool execution surface changed? (`No`)
- Data access scope changed? (`No`)
- If any `Yes`, explain risk + mitigation:
## Human Verification (required)
What you personally verified (not just CI), and how:
- Verified scenarios:
- Edge cases checked:
- What you did **not** verify:
## Compatibility / Migration
- Backward compatible? (`No`)
- Config/env changes? (`Yes`)
- Migration needed? (`No`)
- If yes, exact upgrade steps:
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
Added `directText` flag to cron delivery configuration allowing text payloads to bypass the announce conversion path and be delivered directly to messaging channels.
**Key changes:**
- Added optional `directText` boolean field to `CronDelivery` type and schema
- Implemented CLI flags `--direct-text` in both `cron add` and `cron edit` commands
- Modified delivery routing logic in `run.ts` to check `directText` flag and route accordingly
- Updated merge logic in `jobs.ts` to preserve `directText` field during job updates
**How it works:**
When `directText` is true and text content exists, the cron job delivers the raw text output directly via `deliverOutboundPayloads` instead of routing through the announce flow (which typically summarizes the output). Structured payloads (media, channel data) continue to use direct delivery regardless of this flag.
<h3>Confidence Score: 4/5</h3>
- Safe to merge with one minor style suggestion for consistency
- Implementation follows existing patterns (similar to `bestEffort` flag), adds proper type definitions, schema validation, and CLI integration. One minor style inconsistency exists in type casting approach compared to similar functionality. No logical errors or security concerns identified.
- No files require special attention - all changes are straightforward feature additions
<sub>Last reviewed commit: 22c044f</sub>
<!-- greptile_other_comments_section -->
<sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#22609: feat(cron): add directText flag for text message dilivery and histo...
by bydsky · 2026-02-21
91.0%
#13383: fix(cron): route text-only payloads through direct delivery
by Masha-L · 2026-02-10
79.7%
#23329: feat: Add Markdown support for cron job payload
by HeXavi8 · 2026-02-22
74.2%
#6522: fix(cron): deliver original message when agent response is heartbea...
by sidmohan0 · 2026-02-01
74.1%
#14391: feat(cron): add raw delivery mode for verbatim output
by therealZpoint-bot · 2026-02-12
72.1%
#11216: Fix nightly failures: cron webchat delivery result + media cleanup ...
by DeanoC · 2026-02-07
71.7%
#8097: fix: auto-convert one-shot reminders for reliable delivery
by Gerrald12312 · 2026-02-03
71.4%
#16996: fix(cron): parse Telegram topic target format for announce delivery
by Glucksberg · 2026-02-15
71.3%
#13694: feat(cron): structured output via responseSchema for isolated agent...
by JordanCoin · 2026-02-10
71.0%
#13638: fix: pass delivery context to cron isolated agent subagents
by dario-github · 2026-02-10
70.1%