Commit Graph

2 Commits

Author SHA1 Message Date
alan 1ea1e5b73c Schedule chat prompts: send_at holds a queued prompt until its time
A chat_prompt with a future send_at (epoch ms) is always queued, durable in
chat_prompt_queue (new send_at column, added to older databases on Open),
listed with send_at in chat_queue frames, and delivered by the room's runner
once the time passes, waking on a timer. The queue stays FIFO: prompts queued
after a scheduled one wait behind it. A past or zero send_at behaves as before;
chat_unqueue cancels as for any queued prompt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 00:51:06 +00:00
alan e42f9cc031 Send mid-turn chat prompts to the harness and queue the rest durably on the server
Claude Code (stream-json stdin) and Codex (turn/steer pinned to the active
turn) receive a prompt sent while a turn runs immediately. Other harnesses
(OpenCode) get a durable chat_prompt_queue row owned by the session: it
survives the last client detaching and a server restart, is delivered in
order when the turn ends with or without a client, and is deduplicated by
operation id. chat_subscribe carries the queue, chat_queue frames report
delivered/removed/failed changes, and chat_unqueue removes a waiting prompt.
2026-11-01 18:30:20 +00:00