Skip to content

feat(projects): ask a prompt on a schedule, in a new thread each time or the same one - #605

Merged
adeelahmad merged 1 commit into
mainfrom
claude/project-thread-2i3nwt
Oct 18, 2026
Merged

adeelahmad merged 1 commit into
mainfrom
claude/project-thread-2i3nwt

Conversation

@adeelahmad

Copy link
Copy Markdown
Owner

Requested by Adeel · project thread

Description

Before: a project's threads started only when someone asked.

After: a project can ask a prompt on a schedule ("every Monday at 09:00, plan this week's steps"), as a brief answered in the background. Each schedule picks where it asks: a new thread each time, or the same thread, which keeps the conversation going (and skips a run while that thread is still answering the last one, saying so). A schedule can be switched off; an archived project's schedules wait until it's unarchived. On the project's page, Ask on a schedule offers presets (every morning, every weekday, every Monday) or a cron, in your browser's time zone; each schedule shows when it runs in words, its next time, a link to its thread and the last error, with a switch and Remove (with Undo). Agents set them with the MCP tool schedule_project and the API.

How: each schedule is a timer (project.schedule, key project-{pid}-{sid}) on the existing timers module, re-armed from schedule.next_after after each run and cancelled when switched off, archived or deleted. POST/PATCH/DELETE /api/v1/projects/{id}/schedules[/{sid}]. Schemas are named ProjectSchedule* so they don't collide with the Schedules page's. Last of the projects PRs; listing these on the Schedules page is in "Refine later".

Motivation and Context

Adeel asked for projects with scheduled threads as well as ordinary ones, like this Claude project.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change; ! in the title)

Checklist:

  • The title is a Conventional Commit.
  • My code follows the code style of this project (make hooks checks it on commit).
  • I added or updated tests.
  • My change requires documentation updates, and I have updated docs/ accordingly.
  • Users need more than the title to understand it, so I extended changelog.d/projects.md.

Done questions (AGENTS.md)

  • Goal: scheduled threads, the last part of Adeel's ask (goal, namespaces, coordinator, threads, schedules).
  • Agents: MCP schedule_project and the API (test_schedules_wait_while_off_or_archived_and_agents_set_them).
  • Zero setup: no new prerequisite; timers already run.
  • Fewest clicks and keystrokes: a preset and Enter; the time zone is guessed from the browser; Remove has Undo.
  • Configurable: each schedule is edited on the page; nothing in .env.
  • Light: one timer per schedule, no new service.
  • Private and secure: runs as the project's owner with their approvals; threat model's Projects row updated.
  • Cost: one brief per run through the activity ledger and budgets; the same-thread mode skips a run rather than stacking.
  • User decides: nothing is scheduled unless the person (or their agent) adds it; off and archived wait.
  • Upgrades: new optional field on projects only.
  • Honest: docs label it built; the Schedules page listing is under Refine later.
  • Tests, docs and generated files updated (test_a_schedule_asks_its_prompt_in_a_new_thread_or_the_same_one, projects.test.tsx, docs/projects.md, docs/mcp.md, make openapi).
  • Open standards: cron expressions.
  • "Refine later" items in docs/projects.md.
  • Reuse: the timers module, schedule.next_after/describe, briefs from feat(projects): the coordinator starts threads with a brief, answered in the background #593.

Local CI: ci/local-ci.sh passed the backend, Next.js, pre-commit and title jobs on this change before a clean rebase onto the latest main.


Generated by Claude Code

… or the same one

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015ZmJ29Kc4iXuyKqCRifAH5
@adeelahmad
adeelahmad merged commit 31f87cd into main Oct 18, 2026
12 checks passed
@adeelahmad
adeelahmad deleted the claude/project-thread-2i3nwt branch October 18, 2026 13:26
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.

2 participants