Repository navigation
fix(sessions): a human turn into an unattended run claims it (v0.469.1) - #895
Merged
Merged
Conversation
Typing into a task/automation-dispatched run's terminal didn't count as a
take-over, so the Stop-hook turn-end reaper closed the pane as soon as the
agent answered the follow-up (instapods ses_4e3c7256). attributeTurn now
claims an unclaimed headless run when a person's turn is attributed —
same end-state as Take over, audited session.claimed {via: human-turn}.
Server-delivered text still claims nothing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Problem
instapods
ses_4e3c72563d181c88(engineer, task-dispatched → unattended lane): the run reported at 04:24:23, the owner typed a follow-up in the terminal at 04:24:42 (turn.speaker via:terminal), the agent worked on it, and at 04:28:30 the Stop-hookmarkTurnIdlereaped it (session.reaped {reason: turn-end}). Typing into an unattended run never counted as a take-over, so the reply to a human was the run's last act.Fix
attributeTurn(fires onUserPromptSubmitonce a turn is attributed to a real person: terminal / composer / inject) now callsclaimSession(id, email, 'human-turn')when the run is headless and unclaimed. Same end-state as Take over: sticky,headless → 0, launch env re-marked attended, status back torunning. The interactive idle reaper still bounds an abandoned one. Server-delivered text (pokes, answers) attributes nobody, so it claims nothing.Tests
turn-idle-background-guard-test.cjs§2b: a human turn claims the run, status returns to running, auditedvia: human-turn, and the next turn-end does not tear it down. A poke with no human typing is still reaped.npm run test:governancegreen.🤖 Generated with Claude Code