Skip to content

Chat: "Run later" - send a prompt, but schedule it for execution, instead of running immediately - #313

Merged
pufit merged 2 commits into
mainfrom
arsenmuk/run-later
Aug 19, 2026
Merged

Chat: "Run later" - send a prompt, but schedule it for execution, instead of running immediately#313
pufit merged 2 commits into
mainfrom
arsenmuk/run-later

Conversation

@arsenmuk

@arsenmuk arsenmuk commented Aug 17, 2026

Copy link
Copy Markdown
Member

Problems to be solved:
Sometimes you want to queue a follow-up prompt for an actively running session, but you don't want to disturb it - this new feature allows you to send this new prompt for a new or an existing session (it'll be reliably registered and stored), but its actual execution will be scheduled for some later time.

Changes:

  • Adds a three-dots menu next to Send whose "Run later" entry opens a submenu with "Run in 30 mins", "Run in 1 hour", "Run in 24 hours", and "Just accept it".
  • Selecting any option creates a new session seeded with the composed prompt (and any attachments) and clears the composer, exactly like sending.
  • Creation triggers no LLM turn, so a deferred prompt costs zero tokens until it actually runs.
  • The three timed options schedule a one-shot wakeup that runs the stored prompt after the chosen delay via the existing cron/wakeup mechanism.
  • "Just accept it" persists the session with no wakeup, leaving you to run it manually whenever ready.
  • A synthetic assistant acknowledgment is written into the new session so it shows a clear "scheduled / saved" state.
  • Adds backend tests covering the timed-schedule and accept-only paths.

🤖 Generated with Claude Code

Adds a kebab menu next to Send with a "Run later" submenu (30 mins / 1 hour
/ 24 hours / Just accept it). Any option mints a NEW session, persists the
composer text + attachments as its pending user message and a synthetic
assistant acknowledgment, with zero LLM/token spend. Timed options schedule a
one-shot wakeup that fires engine.run after the delay; "Just accept it"
schedules nothing.

- Deferred message persists ALL uploaded attachments (images and ordinary
  files), resolving file_ids to file/image blocks server-side.
- Timed run-later wakeups dispatch with source="cron" (reason="run-later"),
  mirroring cron/plan_service dispatch; model ScheduleWakeup rows stay
  source="wakeup".
- Tests cover attachment persistence and the source="cron" dispatch path.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@arsenmuk arsenmuk changed the title Chat composer: "Run later" — defer a prompt into a new session without spending tokens Chat: "Run later" - send a prompt, but schedule it for execution, instead of running immediately Aug 17, 2026
@pufit
pufit merged commit 5298ec2 into main Aug 19, 2026
2 checks passed
@pufit
pufit deleted the arsenmuk/run-later branch August 19, 2026 18:41
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