Repository navigation
Conversation
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 2 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
3 of 6 tasks
`session schedule` creates a Temporal schedule whose firing runs a workflow that admits the prompt itself and starts the session's supervisor, so at firing time there is no client and no serve process. Admission is an activity because a prompt is a row in the store, and the message id comes from the firing's workflow id so a re-drive admits the same prompt once.
moetemp
force-pushed
the
moe/scheduled-prompts
branch
from
September 15, 2026 01:01
6dddbda to
99f8e00
Compare
moetemp
force-pushed
the
moe/l3-detached-sessions
branch
from
September 15, 2026 01:01
c980eb6 to
494742b
Compare
|
This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window. Feel free to open a new pull request that follows our guidelines. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds
opencode session schedule, a turn nobody starts.session startstill needs something running to hand the prompt to. A schedule does not: it creates a Temporal schedule whose firing runsscheduledPrompt, a workflow that admits the prompt itself and starts the session's supervisor as an abandoned child, or signals it when it is already running. At firing time there is no client and no serve process.Admission is an activity, because a prompt is a row in the store and a workflow cannot write one. It carries no execution owner, so it leaves the runner's claim on the session alone, and the message id comes from the firing's own workflow id, so a re-drive admits the same prompt once. Overlapping firings are skipped rather than stacked; a firing that lands while the last turn is still working is queued and drained when that turn ends.
packages/opencodegains@temporalio/clientand@temporalio/commonfor the command, loaded only when it runs. Tests:schedule-drain.test.ts,scheduled-prompt-workflow.test.ts, and step 6 ofdetached-session-check.sh.