Repository navigation
Implement #1228 Stop-during-prepare - #1269
Conversation
Register a preparing active Map entry before first-turn prefetchBootstrapNote so stopRun, threads:delete, and stopAll abort the launch instead of spawning after bootstrap.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 70ec99b5a6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| notifyRunTerminal(threadId, "failed", failure.text); | ||
| clearRun(threadId); |
There was a problem hiding this comment.
Clear the preparing entry before terminal notification
When local Grok setup fails while a follow-up is queued during bootstrap, notifyRunTerminal(..., "failed") calls afterFailedTurn and maybeDrainQueued while this run still occupies active. The queued startRun therefore fails with “A run is already active on this thread” and is restored with an error instead of running; orchestrator notices are likewise blocked by flushOrchNotices' active check. Move clearRun(threadId) before the terminal notification, as normal provider failure paths already do; the same reversed ordering occurs in both new Muse overlay-failure paths.
Useful? React with 👍 / 👎.
| store.save(); | ||
| pushDetail(threadId, lastWorkflowByThread.get(threadId) || null); | ||
| pushThreadsChanged(); |
There was a problem hiding this comment.
Close the run span when settling an archived launch
When a thread is archived while prefetchBootstrapNote is pending, abortIfCancelled reaches this helper after otel.startRun has already opened the run span. This path clears the active entry and marks the thread idle but never calls notifyRunTerminal or otel.endRun, so the run remains in the OTel in-flight map and no stopped span is exported. Explicitly close the span, using the known runId, when this cancellation path reaches a still-present archived thread.
Useful? React with 👍 / 👎.
No description provided.