Skip to content

feat(cron): add per-job wrap_response override#4380

Open
JulienTant wants to merge 1 commit intoNousResearch:mainfrom
JulienTant:feat/per-cron-wrap-response
Open

feat(cron): add per-job wrap_response override#4380
JulienTant wants to merge 1 commit intoNousResearch:mainfrom
JulienTant:feat/per-cron-wrap-response

Conversation

@JulienTant
Copy link
Copy Markdown

@JulienTant JulienTant commented Apr 1, 2026

What does this PR do?

Adds per-job wrap_response support to cron jobs. Individual jobs can now override the global cron.wrap_response config setting. When a job has wrap_response set, that value is used; when unset (None), it falls back to the global config as before.

Related Issue

N/A

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 🔒 Security fix
  • 📝 Documentation update
  • ✅ Tests (adding or improving test coverage)
  • ♻️ Refactor (no behavior change)
  • 🎯 New skill (bundled or hub)

Changes Made

  • cron/jobs.pycreate_job() accepts and stores optional wrap_response field
  • cron/scheduler.py_deliver_result() checks job.get("wrap_response") before falling back to global config
  • tools/cronjob_tools.py — Added wrap_response to tool schema, handler function, registry lambda, and create/update action paths
  • cli.py — Added --wrap-response true|false and --no-wrap flags to /cron CLI command for both add and edit subcommands
  • website/docs/user-guide/features/cron.md — Documented per-job override behavior
  • tests/cron/test_scheduler.py — Two new tests covering per-job override in both directions (true overrides global false, false overrides global true)

How to Test

  1. /cron add "every 1h" "test prompt" --no-wrap → verify delivered output has no header/footer wrapper
  2. /cron edit <job_id> --wrap-response true → verify delivery is wrapped even if global config is false
  3. In chat, ask the agent to create a cron job with wrap_response: false → verify raw output on delivery

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run pytest tests/ -q and all tests pass
  • I've added tests for my changes (required for bug fixes, strongly encouraged for features)
  • I've tested on my platform: macOS 15 (Darwin 25.4.0)

Documentation & Housekeeping

  • I've updated relevant documentation (README, docs/, docstrings) — or N/A
  • I've updated cli-config.yaml.example if I added/changed config keys — or N/A
  • I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture or workflows — or N/A
  • I've considered cross-platform impact (Windows, macOS) per the compatibility guide — or N/A
  • I've updated tool descriptions/schemas if I changed tool behavior — or N/A
Allow individual cron jobs to override the global cron.wrap_response
config. Per-job setting takes precedence; None defers to global config.
@JulienTant JulienTant force-pushed the feat/per-cron-wrap-response branch from ca6a75e to d4ea109 Compare April 1, 2026 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant