From ed7cd7dcf6f86f7a74c00af2d94abcb13ab8dddb Mon Sep 17 00:00:00 2001 From: mika kuns Date: Thu, 6 Aug 2026 13:30:06 +0200 Subject: [PATCH] docs(explore-notes): document the queueing gate on open ConPTY sessions Bump conpty-sessions.md's verified-against commit to d84607f and add a section covering the CanSendToQueue / EnqueueTaskAsync interactive-session gate and the switch to routing through the worker hub. --- docs/explore-notes/conpty-sessions.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/docs/explore-notes/conpty-sessions.md b/docs/explore-notes/conpty-sessions.md index a6370d06..ed3f1d1c 100644 --- a/docs/explore-notes/conpty-sessions.md +++ b/docs/explore-notes/conpty-sessions.md @@ -1,7 +1,7 @@ # ConPTY interactive sessions & launch specs > **Explore-note — verify before trusting.** Distilled map of a subsystem, not authoritative. -> Last verified against commit `aac84e4` (2026-08-06). +> Last verified against commit `d84607f` (2026-08-06). > Drift check: `git log --oneline bdee731..HEAD -- src/ClaudeDo.Worker/Planning src/ClaudeDo.Worker/Hub src/ClaudeDo.Worker/Runner/ClaudeArgsBuilder.cs src/ClaudeDo.Ui/ViewModels/MissionControlViewModel.cs src/ClaudeDo.Ui/Views/InteractiveTerminalView.axaml` > Stable structure only (no line numbers). See docs/explore-notes/README.md. @@ -126,6 +126,20 @@ reaches the PTY**. See the note in `src/ClaudeDo.Ui/CLAUDE.md`. tapping it jumps to that Mission Control pane. `TasksIslandViewModel.SyncInteractiveSessions` mirrors Mission Control's open panes onto the rows. +### Queueing is gated on an open session (UI-only, since `d84607f`) + +A task-based session leaves the row `Idle` (sessions never write `Status`), so nothing on the +worker side distinguishes it from a plain idle task. `TaskRowViewModel.CanSendToQueue` and +`MissionControlViewModel.EnqueueTaskAsync` (drag-to-queue onto the Command Center window) both +check for an open session before queueing — the row via `HasInteractiveSession`, the drag path via +`ConPtySessions.Any(s => s.TaskId == taskId)` (Mission Control's own authoritative pane list, +since the mirrored bool on the row could lag). Queueing a task open in a hand-driven ConPTY pane +would otherwise let the picker spawn an autonomous `claude` process into the same worktree the +user is editing. Both enqueue paths (`TasksIslandViewModel.SendToQueueAsync` and +`MissionControlViewModel.EnqueueTaskAsync`) also route through `IWorkerClient.SetTaskStatusAsync` +(hub `SetTaskStatus` → `TaskStateService.EnqueueAsync`) instead of a raw EF write, so the +manual/draft-child guards apply on both paths too. + ## System-prompt matrix (autonomous vs. interactive) Autonomous and interactive sessions do **not** share a system prompt. Per start path: