Skip to content

feat(scheduled-agents): agent-integrity for Claude Code scheduled agents#52

Merged
imran-siddique merged 2 commits into
mainfrom
feat/scheduled-agents-integration
Jul 21, 2026
Merged

feat(scheduled-agents): agent-integrity for Claude Code scheduled agents#52
imran-siddique merged 2 commits into
mainfrom
feat/scheduled-agents-integration

Conversation

@imran-siddique

Copy link
Copy Markdown
Contributor

What

A new community integration, scheduled-agents/, that answers one question for the part of Claude Code you do not sit and watch: are the things that run without me the ones I approved, nothing added, nothing subtracted?

A coding session is driven; you approve every tool call. A scheduled agent runs headless on a cron and keeps running long after setup. "Set it and forget it" assumes its behaviour next week matches today. It rarely does: a routine's tools get widened during a debug session and never narrowed back, a schedule moves, a new hook drops into settings.json and now a command auto-runs every session.

This plugin fingerprints both surfaces and warns the moment either drifts from an approved baseline:

  • routines — declared spec files (~/.claude/agentrust/routines/*.json): schedule, allowed tools, MCP servers, prompt, model.
  • hooks — the commands in ~/.claude/settings.json that auto-run on events.

How it mirrors claude-code/

  • SessionStart hook is stdlib-only, fail-safe (any error → benign context, exit 0), never blocks a session.
  • /schedule-manifest verify | approve | show and /schedule-trace.
  • /schedule-trace signs a TRACE Level 0 (software-only) record with a persistent Ed25519 key; the public JWK is published for third-party verification.
  • Same stdlib/signing CI split (scheduled-agents-tests.yml).

Honest scope

Baselines the declared routine specs and on-disk hooks and detects drift in those declarations. It does not introspect a live cloud routine's runtime behaviour (nothing on a dev box can prove that), and it is software integrity (Level 0), never presented as hardware-attested. v1 reads the global settings hooks block; project-scoped hooks are roadmap.

Verification

  • 21 tests pass (drift path stdlib-only; signing tests skip cleanly without agentrust-trace).
  • End-to-end run confirmed: baseline → drift warning (added routine tool babysit-prs: Bash(curl:*), schedule change, injected curl … | sh hook) → plain-English report → signed trace.json passing the public Level 0 conformance suite (8/8).

🤖 Generated with Claude Code

New community integration that fingerprints the things that run without you
watching -- declared routine specs (schedule, allowed tools, MCP servers,
prompt, model) and the auto-run hooks in settings.json -- and warns at
SessionStart when any of it drifts from an approved baseline.

Drift detection (snapshot/verify/approve + the SessionStart hook) is Python
stdlib only, so the hook never blocks a session. /schedule-trace signs a TRACE
Trust Record (Level 0, software-only) verifiable by a third party; signing needs
agentrust-trace and is exercised in the signing CI job.

Mirrors the claude-code plugin layout and its stdlib/signing test split. 21
tests pass; the signed record passes the public Level 0 conformance suite.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@imran-siddique
imran-siddique force-pushed the feat/scheduled-agents-integration branch from 8e76357 to 72c7c56 Compare July 21, 2026 22:37
…essing)

Mirrors claude-code/PRIVACY.md: names and fingerprints only, no secrets, no
credentials file, no telemetry; baseline and records stay on the machine.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@imran-siddique
imran-siddique merged commit 0b60124 into main Jul 21, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant