Skip to content

Mid-task topic switching

Historical record — this ships behavior documented in ADR 0002, written up here after the fact since it predates the improvements/ convention. See that ADR for the full context, decision, and consequences; source PRs are nova-superagent-agent #431, #440, #443.

Problem

The Super Agent hands requests off to a Functional Agent (FA) and waits for completion or a follow-up question. Real users don't wait patiently — they change their mind or ask something unrelated mid-task. Before this change, there was no recognized status for an FA to hand control back on a topic switch, and the exchange that happened during the handoff was buried in a weakly-attended tool-result JSON blob, so the assistant often lost track of what had actually happened.

Proposed change

  • Added intent_mismatch as a first-class FA response status (alongside completed/error/scheduled), so an FA can hand back control when it detects the user has deviated from the original request.
  • Surfaced the hidden handoff exchange as a tagged <conversation_recap> conversation turn instead of leaving it inside tool-result JSON, so the model attends to it like any other turn.
  • Treated the user's latest message as their current, authoritative request, re-planning around it instead of continuing to wait on (or silently abandoning) the original task.

Value

Users can naturally say "actually, forget that — help me with X instead" mid-task, and the assistant follows the switch instead of getting stuck or erroring. This is a one-off behavioral fix with no broader theme beyond itself — no schema implications, which is why it lives here rather than as a Feature Set.

Schema impact

None. intent_mismatch is an FA response status and <conversation_recap> is a prompt/conversation-turn convention — neither touches ../../schema/.

Acceptance criteria

  • [x] FA can return intent_mismatch instead of failing validation or erroring when the user has moved on.
  • [x] The handoff exchange is re-injected as a tagged conversation turn the assistant can accurately recap.
  • [x] tests/testsets/eval_context_switch_test.yml (in nova-superagent-agent) covers this behavior and is the reference point if it regresses — this remains a prompt-tuning surface, not a one-shot fix.