Repository navigation
docs(cron): document cron autonomy and permission scope - #1562
Conversation
…on_success Reframe the section as "Autonomy and Permission Scope": cron skipping inbound chat checks is intentional and is how agents act autonomously. Document that usercron write access also grants scheduled shell execution via disable_on_success (run by OpenAB, outside agent tool approval), and replace the mitigation list with three explicit scope choices. Drop the unverified /model example. Builds on #1560. Co-authored-by: charlie0228 <24387287+charlie0228@users.noreply.github.com> Co-authored-by: thoththeagent <287470606+thoththeagent@users.noreply.github.com>
|
Thanks for picking this up and keeping the authorship intact — much appreciated. The "Autonomy and Permission Scope" framing is better than mine. Presenting the bypass as a scope you choose to grant, rather than as a warning, fits how the feature is meant to be used. The baseline-vs-usercron table makes the A few notes:
Related: #1561 (thread_id/id interaction and the |
This comment has been minimized.
This comment has been minimized.
- Drop the unenforceable "agent-managed prompts, operator-managed commands" scope; explain prompts and commands share one file and note absolute usercron_path and shell bypass of path rules (F1) - State that disable_on_success runs as the OpenAB process user, outside tool approval and any agent sandbox; spell out the full injection chain in a CAUTION callout (F2, F6) - Distinguish persistence (trust-all-tools) from new privilege (restricted or sandboxed agent) (F3) - Clarify only the inbound adapter path is bypassed and that slash command handling is backend-specific (F4) - Make audit advice durable: commit or persist events outside the agent's writable scope (F5) - Replace the table with prose and add a CAUTION pointer in Goal-Driven Auto-Disable (F7)
An agent that can write the directory can replace a file it does not own, and a read-only usercron file blocks enabled=false / thread_id writeback, so achieved goal jobs keep firing.
This comment has been minimized.
This comment has been minimized.
- disable_on_success inherits OpenAB's full environment (bot tokens), unlike the env-cleared agent process; fix the trust-all-tools bullet and the injection CAUTION (S1) - describe the load-time drop when id or disable_on_success_match is missing (F6) - writeback fails only when OpenAB cannot write the directory; state the shared-uid default, sticky bit, and thread_id/id guidance (S3) - describe bypassed inbound filters by category, including allow_dm (S2) - mark kiro-cli /clear handling as an example (F2) - require audit records outside agent reach, not local git (F5) - refer to the resolved usercron_path for writeback and re-enable
|
Note LGTM ✅ - The supplemental round-2 findings are addressed in What This PR DoesAdds How It WorksRound 3 reviews head
Findings
Finding Details🟢 Verification on head
|
| Round | Findings | Resolution |
|---|---|---|
Round 1 (d34039a1) |
F1-F7 | ✅ Addressed in d2ef9d24 |
Round 2 (49517de4) |
N1 | ✅ Addressed in 49517de4 |
| Round 2 supplemental | S1-S3, plus F2/F5/F6 refinements | ✅ Addressed in 7accd5f4 |
Baseline Check
- PR opened: 2026-10-05; base
main; head7accd5f45d7b2bade39f12a9b90b3689c6fa7211; merge-base99c11ec10e239c4054c304efee6b99204ac6440a - Diff vs base:
docs/cronjob.mdonly, 5 commits - Main already has: the cron bypass rationale in
docs/adr/identity-trust-none.md;disable_on_successfield docs indocs/cronjob.mdanddocs/config-reference.md - Net-new value: an operator-facing statement that usercron write access includes scheduled shell execution as the OpenAB process user, with OpenAB's environment and outside agent tool approval, plus an enforceable scope choice and the writeback caveats
Suggested Follow-ups (non-blocking)
- An operator-controlled switch such as
[cron] usercron_allow_commands = false(default), or an allowlist fordisable_on_success, stored inconfig.toml. - Run
disable_on_successwith a cleared or minimal environment, matching the agent process, so that bot tokens are not exposed to cron commands. - Make the cron trust-gate bypass explicit (the ADR's
InboundSource::SystemCron).
5. Three Reasons We Might Not Need This PR
- The better fix is in code: clearing the environment for
disable_on_successand adding an operator allowlist would remove most of this guidance. - Section length: the writeback and thread caveats make the operator-managed option long. It is accurate, but it is a lot to read for a niche configuration.
- Staleness risk: the ADR's Trust Gate migration and any env-handling change will require this section to be revised.
…ndow (#1573) GitHub delivers the hourly schedule every ~4-5h, so the 'commit in the last ~70min' gate skipped most merges. The last full pre-beta build was 99c11ec (2026-10-03); #1562, #1564, #1568 and #1569 never reached pre-beta-*, which also kept downstream openab-pty images on Node 22.23.3. Build when main HEAD differs from the head SHA of the last successful run that tagged every agent. Co-authored-by: chaodu-agent <274062505+chaodu-agent@users.noreply.github.com>
What problem does this solve?
docs/cronjob.mddoes not tell operators that cron prompts skip the inbound checks applied to chat messages (trust gate, @mention, bot filtering), or what write access to the cron configuration grants. This is intentional - cron is how OpenAB gives agents autonomy - but operators need to know the scope to decide how much of it to grant. In particular, usercron write access also grants scheduled shell execution throughdisable_on_success, which OpenAB runs itself outside the agent's tool-approval model.Supersedes #1560. Credits: the original section, analysis, and manual validation are by @thoththeagent / @charlie0228 (commit
22e1aae4is cherry-picked with original authorship; the follow-up commit carriesCo-authored-bytrailers).Closes # (none - docs gap)
Discord Discussion URL: https://discord.com/channels/1491295327620169908/1491365158868619404/1556499283048665139
Review Contract
Goal
Document in the user-facing cron guide that cron prompts bypass inbound chat checks by design, what write access to
config.toml/cronjob.tomlgrants (includingdisable_on_successshell execution), and how to choose an autonomy scope.Non-goals
cronjob.toml.Accepted Residual Risks
None - docs-only change; no runtime behavior is affected.
Acceptance Criteria
docs/cronjob.mdhas a## Autonomy and Permission Scopesection stating that cron prompts skip the adapter's inbound filters (allowlists, DM gating, @mention, bot filtering), framed as intentional.disable_on_success, run by OpenAB outside the agent's tool approval and with OpenAB's full environment (unlike the env-cleared agent process).adr/identity-trust-none.md,#agent-managed-schedules, and#goal-driven-auto-disableresolve.Follow-ups
cronjob.tomlchanges, or an opt-in to apply L2 scope checks to usercron jobs.[cron] usercron_allow_commandsswitch or allowlist inconfig.toml, or movingdisable_on_successto operator-owned config (note the default-compatibility trade-off).fire_cronjob; consider surfacing load-time usercron drops (missingid/marker, unconfigured platform) beyond a log warning.At a Glance
Prior Art & Industry Research
Not applicable - docs-only change describing existing OpenAB behavior.
Proposed Solution
Starting from #1560, rename the section to
## Autonomy and Permission Scopeand restructure it into:cronjob.tomlgrants:disable_on_success(sh -con Unix,cmd /Con Windows) is executed by OpenAB on every schedule match before the prompt, as the OpenAB process user with its full environment; the load-time requirements (id,disable_on_success_match); and when this adds persistence vs. new privilege or credentials.The unverified
/model <id>example was dropped;/clearwas verified in #1560.Why this approach?
Framing the section around autonomy scope matches the design intent (cron exists to let agents act on their own) while still giving operators the facts. The original "Security Considerations" framing undersold the capability (prompts only) and read as a vulnerability disclosure for intended behavior.
Alternatives Considered
disable_on_success, so operators restricting the agent's shell tool would underestimate whatcronjob.tomlwrite access grants.Validation
main(99c11ec):fire_cronjobcallsrouter.handle_messagewith nogate_incoming;prompt: job.message.clone()is forwarded verbatim;check_disable_on_successrunsshell_command()(sh -c/cmd /C) without clearing the environment, while the agent process is started withenv_clear(); usercron is hot-reloaded on mtime change each scheduler tick;load_usercron_filedropsdisable_on_successentries missingidordisable_on_success_match; writeback uses a temp file + rename in the same directory.### Agent-Managed Schedules,### Goal-Driven Auto-Disable,#### Minimal config.toml example;docs/adr/identity-trust-none.mdexists.message = "/clear"executed without @mention on OpenAB0.10.0-beta.1.