SIGN IN SIGN UP

Let an admin grant a specific cron narrow admin-read access for unattended fires (#471)

Unattended cron fires cannot use the admin API — autonomous turns are refused admin capability, which is the right default but blocks legitimately unattended workflows such as a cron that reads conversation transcripts to find and file fixes for user-visible failures. Rather than weakening that gate, an org admin can now — only on an attended turn they started themselves — imbue one specific cron with a narrow, explicit admin-read grant. Fire-time turns receive exactly that grant and nothing more: grants are forwarded through the turn pipeline, stripped at the external boundary, re-checked when the cron runs, and dropped to the floor on any raw tampering. Any capability beyond the grant still requires a human.

**Deployment notes**

Crons gain an optional persisted unattendedGrants field via the DurableMap JSON store — old
rows read fine, and rollback is safe (old code simply ignores the field, and run/enable re-checks
mean a stale grant can't fire without the checks on new code)
Capability tokens gain an optional grants claim; verification only type-checks it when present, and
old instances in the blue-green window ignore unknown claims rather than rejecting the token
Feature is opt-in and tightly gated: personal-scope, runs-as-owner crons whose owner is a live
org admin; grants are stripped at the external boundary and re-validated at fire time — no default
behavior change for orgs
OriginalforkPR:Cronunattendedadmin-readgrants(continuous-improvementloopMVP)

<!-- codesmith:footer -->
---
<a href="https://app.blacksmith.sh/yc-software/codesmith/qm/pr/460"><picture><source media="(prefers-color-scheme: dark)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v2.svg"><source media="(prefers-color-scheme: light)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-light-v2.svg"><img alt="View with [code]smith" src="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v2.svg"></picture></a> <a href="https://backend.blacksmith.sh/track/enable-autofix?expires=1789246098&installation_model_id=19911&pr_number=460&repository=yc-software%2Fqm&return_to=https%3A%2F%2Fgithub.com%2Fyc-software%2Fqm%2Fpull%2F460&signature=b1c8956fee97a3323a313ae3ae3326a9050b376939603059346bcbacaf51fca4"><picture><source media="(prefers-color-scheme: dark)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-light.svg"><img alt="Autofix with [code]smith" src="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark.svg"></picture></a>
<sup>Need help on this PR? Tag <code>@codesmith-bot</code> with what you need. Autofix is disabled.</sup>

<!-- codesmith:autofix:disabled -->
<!-- /codesmith:footer -->
R
Regan Bell committed
95ce87d4050ba1bb62d467110b40d501a012ee72
Parent: 06c5fe9
Committed by GitHub <noreply@github.com> on 8/13/2026, 10:26:06 PM