docs(specs): agent handoffs and consults for mid-thread @-mentions - #1290
Merged
Merged
Conversation
Phase 0 (task chips): hand off to a new conversation with a reviewable context card, send results back, and let the model suggest tasks. Phase 1 (consults), where an @-mentioned Agent runs in place and reports back, is built only if Phase 0's measured send-back rate passes a gate. 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.
Summary
Draft spec:
docs/specs/agent-handoffs-and-consults.md. Docs only, no code changes.Since #1115, an
@-mention in a thread that already has messages opens a new conversation with the Agent. That protects the thread's history and prompt cache, but the Agent starts with no context ("draft a rubric for this"). The spec covers that gap in two phases.Phase 0: task chips (useful on its own, and the measurement for Phase 1)
suggest_tasktool with a fixed definition (no list of Agents, so pin changes don't bust the cache). It is rate-limited and opt-in.The gate (§7). Six weeks of Phase 0 counts (handoffs, edits to the context card, send-backs) decide whether Phase 1 gets built.
Phase 1: consults. An
@-mentioned Agent runs in place in its own hidden session, before the main agent, and a size-capped report is appended to the user's message. Pauses (OAuth consent, tool approval, questions, sign-in) end the consult instead of resuming in v1.Both phases are designed around the three failures of the removed one-turn borrow: the split history (#741/#751), the full re-cache of the thread's prompt, and tools silently disappearing on the next turn.
Review asks
Test plan
🤖 Generated with Claude Code