feat(sessions): focus check — nudge a session that goes down a rabbit hole (v0.447.0) - #830
Merged
Merged
Conversation
… hole (v0.447.0) A rabbit hole is busy, varied work on the wrong thing, so the shape-based verdicts (circling/stuck) read it as forward. Haiku now compares a run's recent work against the ask (as amended by later human messages) out of band, confirms a drifted vote 2-of-3, shows `drifting` on the session strip, parks an advisory note on the agent's next tool call, and cards the owner of an unattended run once if it keeps drifting. Never blocks or stops anything. Tuned on a replay of 30 long live sessions: 2 genuine rabbit holes confirmed (one held-out), 0 false positives at the shipped floor. Co-Authored-By: Claude Opus 5 (1M context) <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.
Why
Sessions go down rabbit holes and nobody can tell. The existing verdicts only see a run's shape (
circling= the same action repeated,stuck= silence); a rabbit hole is busy, varied work on the wrong thing, so it reads asforward.What
current_ask, then the verdict.driftedfirst vote is confirmed by two more; a 2-of-3 majority at confidence ≥ 0.8 is required.driftingverdict.additionalContext), suggesting ittask_createthe side-finding and return.sessionOwnerInbox card per streak.claude -p --model claude-haiku-4-5(runClaudePrompt, extracted from the summarizer).nudge(default) ·observe·offdriftCheck: falseAOS_DRIFT=0Calibration
The replay used production prompts against 30 long instapods transcripts (read-only), 90 checkpoints. Full table in
docs/drift-focus-check.md.<task-notification>/ skill bodies were read as human messages, hiding the real redirections. Now filtered.Test
scripts/drift-nudge-test.cjs(96 assertions, added totest:governance): parser, input building, cadence, streak outcomes, copy framing, progress precedence, and end-to-end throughTerminalManager.gateagainst a stub Anthropic API (split votes, observe/off, opt-out, garbled judge, no card for interactive runs).npm run build,webbuild and the fullnpm run test:governancepass.🤖 Generated with Claude Code