Skip to content

only kill stale model instances when there's _any other type of sessi… - #6

Closed
lukemarsden wants to merge 1 commit into
long-runningfrom
leave-modelinstances-running
Closed

only kill stale model instances when there's _any other type of sessi…#6
lukemarsden wants to merge 1 commit into
long-runningfrom
leave-modelinstances-running

Conversation

@lukemarsden

Copy link
Copy Markdown
Collaborator

…on_ waiting to be handled

lukemarsden added a commit that referenced this pull request Feb 6, 2026
60-second stability test: 1591 frames at 26.5 FPS, zero drops.
Documented pipeline element ordering bug (#6) and GL context
exhaustion issue (#7). Updated data flow diagram with downscale path.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
lukemarsden added a commit that referenced this pull request Mar 18, 2026
Issue #1 (stuck "Starting Desktop"):
- Add defer in StartDesktop to clear external_agent_status on any error
- Give waitForDesktopBridge its own 90s context decoupled from dockerCtx

Issue #4 (status not cleared on stop):
- StopDesktop unconditionally clears external_agent_status and status_message

Issue #5 (no restart button in Starting state):
- Frontend: show Stop button in "starting" state in both screenshot and stream modes
- Show "may have failed to start" message after 2-minute timeout

Issue #10a (duplicate sessions per spectask):
- Re-read task from DB before CreateSession; skip if PlanningSessionID already set

Issue #10b (scanner targets wrong sessions):
- processPendingPromptsForIdleSessions now filters to canonical planning_session_id only

Issue #2 (duplicate message sends):
- Add ClaimPromptForSending() atomic store method (UPDATE WHERE status IN pending/failed)
- Both interrupt and any-pending delivery paths use claim before send

Issue #7 (promotion race gives empty zvol):
- resolveDockerDataDir: acquire read lock before fresh zvol creation; re-check after

Issue #3: Already handled by existing open_thread on agent_ready reconnect

Issue #6: Fixed in merged PR #1947 (RecoverStaleBuilds 60s retry)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Spec-Ref: helix-specs@04b515c3c:001588_read-helixs-design2026
binocarlos added a commit that referenced this pull request Jun 10, 2026
…ined

User pushback on the previous "child renders parent's interactions
inline by fetching them" approach was correct: it works for one
level of fork, but fork-of-fork would only see the IMMEDIATE
parent's turns, not the full ancestry. A fork should be a complete
snapshot of the conversation at the moment it was taken.

Design change: when forking, copy every non-fork_seed interaction
from the parent into the child as a real interaction row, marked
with the new Trigger=fork_inherited. The child then owns its full
history natively — no chain-walking, no cross-session fetches.

A fork-of-fork falls out for free: B's interactions are
[A's inherited copies, B's fork_seed, B's own turns]. When forking
B → C, the helper copies B's non-fork_seed rows, which means C
inherits A's turns (via B's copies) PLUS B's own turns, with C's
own fork_seed marking the new boundary. Test
TestForkSessionFromParent_ChainDepth2PreservesFullAncestry covers
this exact case.

maybePrependTranscript is unchanged: fork_seed.response_message
still carries the serialized blob used to seed the agent on first
message (Zed thread starts fresh and can't read helix DB rows).
The inherited interaction rows are for UI display; the prepend is
for agent context. Both layers stay in sync because they share the
same parent-interaction source at fork time.

Frontend: revert the parent-fetch logic from the previous commit
(now obsolete — the inherited rows render through the existing
visibleInteractions path).

Test updates: existing assertions of "child has 1 interaction"
become "1 + N inherited" — verified across snapshot, override-app,
empty-parent, and recursive-strip tests. memorystore's
ListInteractions already supports the per-session filter so no
store changes needed.

Verified end-to-end in the inner Helix on task #6 (Copy semantics
test): created a Claude Code session that responded "A robot
learned to love…", forked to test2 → the inherited prompt and the
agent's reply both render as proper chat bubbles in the child,
followed by the fork_seed divider and the new chat input.

Spec-Ref: helix-specs:002082_what-i-want-to-do-is
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.

1 participant