Skip to content

Handoff instead of compaction: finish the feature (agent source, thread menu, roles, later items) #877

Open

Description

@scuttletoby

What: long threads (the assistant and the project orchestrators) never compact. When they get large or sit idle, T3 starts a fresh session in the same thread with a short written handover, so the thread keeps its memory and every later call is cheaper.

Why the owner wants it: one long-lived thread per project that the owner talks to; compaction loses detail and large contexts cost usage.

Already built: HO1 setting and pure decision #282, HO2 HandoffService with size and idle triggers #320 (+ #583 #605 #612 #634 #666), HO3 the "command" source #775, HO5 seam lines #774, Fork settings rows #544.

Left (checklist):

Owner decisions already given: #215 rows 2-4 (only long threads; 150K tokens; idle handoff before the prompt cache runs out).

Done when: an orchestrator thread runs for weeks without compaction, each handoff is visible in the thread, and a failed handoff falls back to normal compaction with an alert.

🤖 Generated with Claude Code

Activity

  1. scuttletoby commented on Nov 28, 2026

    @scuttletoby
    OwnerAuthor

    Working on "Later: re-arm the idle timer after a restart": at start the handoff service re-arms the idle timer of each handoff thread whose last turn ended while its prompt cache is still warm (idle trigger only, so no size handoff fires from a restart). One fork PR.

    🤖 Generated with Claude Code

  2. scuttletoby commented on Nov 28, 2026

    @scuttletoby
    OwnerAuthor

    Working on the HO5 leftover, the "Handoff N" divider label, step 1: announce its seam lines in TimelineUserMessageRow.tsx with a new design that keeps upstream's lines where they are (one fork line before upstream's fresh-session line renders "Handoff N" and hides the next sibling, upstream's "New session" divider). The unused 11-21 announcements (the scope wrapper, and the V2LifecycleRow.tsx lines) are dropped. One list-only fork PR.

    🤖 Generated with Claude Code

  3. scuttletoby commented on Nov 28, 2026

    @scuttletoby
    OwnerAuthor

    HO5 "Handoff N" divider, step 2 (spends the lines announced in #1235): #1236. A handoff's first message shows "Handoff N" and hides upstream's "New session" divider; any other message, and old or partial rows, render nothing and hide nothing. Browser tests run on upstream's real UserMessageRow.

    🤖 Generated with Claude Code

  4. scuttletoby commented on Nov 28, 2026

    @scuttletoby
    OwnerAuthor

    Working on "Later: an agent tool 'hand off my own thread now'": a handoff_now T3 tool (fork toolkit, calling thread only). When the calling turn completes, the thread hands off as a press of Hand off now does, but a busy thread is waited for instead of the request being dropped. One fork PR.

    🤖 Generated with Claude Code

  5. added
    area:agents
    size:big
    type:feature
    on Nov 29, 2026
  6. scuttletoby commented on Nov 29, 2026

    @scuttletoby
    OwnerAuthor

    Working on "Later: hand off before an account runs out of usage", part 1: a handoff thread follows the account order (#881). When the thread's account is spent (the order's reserve check) and the order that applies (the project's, else the server's) has an account with room that lists the same model, its turn end hands off (reason account) and the new session starts on that account; any other handoff (size, idle, a press) whose account is spent goes there too. No order, unknown usage or no room anywhere: nothing moves. A run that already failed at the limit is part 2. One fork PR.

    🤖 Generated with Claude Code

  7. scuttletoby commented on Nov 29, 2026

    @scuttletoby
    OwnerAuthor

    Working on "Later: hand off before an account runs out of usage", part 2 (left by #1350): a run that already failed at the usage limit. When a handoff thread's turn fails because its account hit its limit and the account order has an account with room that lists the same model, the thread hands off onto that account instead of stopping. One fork PR.

    🤖 Generated with Claude Code

  8. scuttletoby commented on Nov 29, 2026

    @scuttletoby
    OwnerAuthor

    Decision for HO6 (orchestrator, clear call): the owner's checklist line stands - at a handoff the model policy decides the new session's model, the same way it decides for a new thread (allowed models, default model per role). If the thread's current model is allowed, it is kept; if not, the policy's choice is used and the handoff message says which model it switched to. The docs line that says the policy does not check a handoff's model is out of date and changes with that part.

    🤖 Generated with Claude Code

  9. scuttletoby commented on Nov 29, 2026

    @scuttletoby
    OwnerAuthor

    Working on HO6's model part (decision of 11-29): at a handoff the model policy decides the new session's model. An allowed current model is kept; otherwise the policy's choice is used and the handoff message names the switch. Docs line updated with it. One fork PR.

    🤖 Generated with Claude Code

  10. scuttletoby commented on Nov 30, 2026

    @scuttletoby
    OwnerAuthor

    Checklist status (a backlog agent found no unbuilt part here):

    Once #1430, #1240 and #1373 merge, every row is covered.

    🤖 Generated with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:agentssize:bigtype:feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions