Skip to content

feat(tui): add /handoff to fold context and start the next turn - #1153

Merged
TheGreatAxios merged 6 commits into
mainfrom
cl-8743-add-handoff-optional-instructions-fold-then-immediately
Sep 22, 2026
Merged

TheGreatAxios merged 6 commits into
mainfrom
cl-8743-add-handoff-optional-instructions-fold-then-immediately

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Summary

  • Adds the /handoff slash command with optional trailing instructions. Running it arms the shared operator fold (same pipeline as compact) and delivers a next turn immediately: the instructions become the inbound content, default pivot copy when omitted.
  • Unlike /compact, handoff always re-infers after the fold, so the operator can pivot goals without /clear. Pivot instructions stay sticky for the summary context and are written into the compact record.
  • In-flight tool batches: handoff queues behind the batch through the serial send path; whichever boundary fires first (tool pause or pivot arrival) runs the single operator fold, because firing clears the arming. An undelivered pivot disarms.
  • Targets release 0.3.31. Linear: CL-8743.

Verification

  • bun test src/agent/compaction.test.ts src/tui/commands/built-in.test.ts src/tui/runner/handoff.test.ts: 83 pass, 0 fail.
  • bun run check: exit 0 (lint, typecheck, dead-exports, build, projects-dir-guard incl. full suite 7844 pass, 0 fail).
  • Note: worktree needed a real bun install; a symlinked node_modules made @intX resolve to the main checkout and tripped the dead-export scan floor plus a stale-incremental semver error. No repo change for this.

Fixes CL-8743

@linear-code

linear-code Bot commented Sep 21, 2026

Copy link
Copy Markdown

CL-8743

@TheGreatAxios
TheGreatAxios force-pushed the cl-8743-add-handoff-optional-instructions-fold-then-immediately branch from 6e0af13 to 501e27b Compare September 22, 2026 15:21
Compact stops after the fold; handoff pivots, so the optional trailing instructions arm the shared operator fold and the same submit delivers the pivot as the next inbound turn.
Restoring snapshots after the fold (or after a noop arm) wiped sticky
extras and re-armed a second idle compact.
Overflow compact left /handoff armed, so the pivot folded a
second time. Keepers pin empty-trailing cancel, noop-after-idle
cancel, and TUI uncertain noop.
@TheGreatAxios
TheGreatAxios force-pushed the cl-8743-add-handoff-optional-instructions-fold-then-immediately branch from 501e27b to fca2380 Compare September 22, 2026 15:34
@TheGreatAxios
TheGreatAxios enabled auto-merge (squash) September 22, 2026 15:35
@TheGreatAxios
TheGreatAxios merged commit 8aa2b03 into main Sep 22, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant