Skip to content

insights: a Claude Code scheduled task and its runs are read as a schedule of theirs - #49

Open
AlexJov996 wants to merge 1 commit into
proxify-dev:mainfrom
AlexJov996:insights-scheduled-tasks
Open

AlexJov996 wants to merge 1 commit into
proxify-dev:mainfrom
AlexJov996:insights-scheduled-tasks

Conversation

@AlexJov996

Copy link
Copy Markdown
Contributor

Before and after: The scan read Claude Code's scheduled tasks from a scheduled_tasks.json only. The app now keeps one folder per task, ~/.claude/scheduled-tasks/<name>/SKILL.md (name and description in the frontmatter, the prompt below), and each run of one is a session written with the person's own entrypoint (claude-desktop), promptSource "system", turnOrigin "scheduled" and a first message that is a <scheduled-task name="…" file="…"> block. Such a task was no schedule, and its runs counted as sessions the person typed in: with three tasks and six runs on a laptop, the "Agents that start themselves" row read "no schedule of yours that starts an agent, and no unattended run". Now it reads "3 schedules of yours start an agent; 6 runs began while you were away", state built and used, and the runs-start-without-you practice has its evidence (the digest lists the tasks and their runs by template).

What changed: the file inventory (scan_claude_dir) lists each task folder in claude_scheduled_tasks, one per count, with the task's name and description; it is never read as a skill (only skills/ is). The session reader keeps the task's name on the record (scheduled_task, from the first message, only when the record says a scheduled trigger started the turn), and one helper, unattended(r), now tells a headless run apart everywhere the code did it by entrypoint alone: such a session is an unattended run, SchedulerStarts.started names the task as its parent, and its template is the task's name rather than "(no prompt)". The board row and the Built tab needed no change; their wording already said "Claude Code's scheduled tasks".

Test: from plugins/insights/scripts/setup-snapshot/experiments: cd 2026-10-27-anatomy && python3 -I test_scheduled_tasks.py (a task folder is one schedule with its name; two folders count twice; a task folder is not a skill; a folder without SKILL.md is nothing; the JSON shape still counts) and cd 2026-11-02-evidence && python3 -I test_scheduled_runs.py (the record names the task that started it; a typed desktop session names none; a scheduled run is an unattended run that a schedule started even when the person typed elsewhere a minute before, and not a typed session; a typed desktop session stays typed). The existing suites (test_mcp_built, setup-read, engine, views) pass as on main, where test_find already fails to import a missing test_frame_member. A full run on a laptop with three such tasks and six runs read the row as above and listed no skill under the tasks folder.

  • One change. I did not edit a version, a CHANGELOG.md, marketplace.json or kit.json.
  • Nothing personal: no names, no paths from my machine, no output of my own scan, no secrets.

…edule of theirs

The scan read Claude Code's scheduled tasks from a scheduled_tasks.json only. The app now keeps one folder per task
under ~/.claude/scheduled-tasks/<name>/SKILL.md (the name and description up top, the prompt below), and each run
of one is a session with the person's own entrypoint (claude-desktop), promptSource "system", turnOrigin "scheduled"
and a first message that is a <scheduled-task name=...> block. Such a task was no schedule, and its runs were sessions
the person typed in: the "Agents that start themselves" row read "no schedule of yours", with no run while away.

The file inventory lists each task folder in claude_scheduled_tasks (one per count, never a skill). The session reader
keeps the task's name on the record, and a session that names one is an unattended run a scheduler started, wherever
the code tells a headless run apart (one helper, unattended(r)). A test per side: the folder shape and the old JSON
shape; a scheduled run against a typed desktop session.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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