Logo vun Session Handoff

Session Handoff

Organisatioun
upex-galaxy
session-handoff

Compact an entire agent session into a handoff document so a NEW session resumes exactly where this one stopped, as if the context window had been extended rather than reset. Use when the context window is getting high (default threshold ~500k tokens, beyond which the model degrades and starts inventing), when work must continue past the end of this session, or on any variant of: hagamos el handoff, pasa el contexto a otra sesion, continua esto en otra sesion, hand this session over, continue this in a fresh session, write a handoff, session handoff. Produces <<PRIMARY_ROOT>>/.session/handoffs/<session-name>-handoff-NN.md (the primary checkout, also from a worktree) and, when an orchestration runtime is reachable, launches the successor itself in the SAME worktree and the SAME harness. Do NOT use for: delegating a scoped task to a worker while you keep working (that is orca-orchestration), one-shot subagent dispatch, or persisting durable project facts across projects (that is Engram memory).

Iwwersiicht

Editeurupex-galaxy
Repositoryagentic-qa-boilerplate
Skill-Nummsession-handoff
Stären
26
Forks
13
Matgeliwwert Fichieren
4
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 4 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    Vum upex-galaxy op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Session Handoff an TypingMind, fir e mat all LLM ze benotzen, oder füügt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vun GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier hei drënner an a bestätegt.
    https://github.com/upex-galaxy/agentic-qa-boilerplate/tree/main/.agents/skills/session-handoff
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill afügen → Vu GitHub-URL, pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an de Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/upex-galaxy/agentic-qa-boilerplate.git /tmp/agentic-qa-boilerplate
mkdir -p .claude/skills
cp -r /tmp/agentic-qa-boilerplate/.agents/skills/session-handoff .claude/skills/session-handoff
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Session Handoff an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Session Handoff automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Session Handoff net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Keys.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Session Handoff

A handoff is context transplanted, not context summarized. The successor is not a reader being briefed on someone else's work; it IS this session, with a new window. Everything it needs to act must be on disk, addressable, and true when it reads.

The skill is small on purpose. The heavy artifact is the markdown it produces, and the whole contract lives in .agents/skills/session-handoff/references/capture-contract.md.

What this is not

Looks similarActually isUse
hand a scoped task to another session and supervise itorchestration: Task, Dispatch, mailbox, the work comes back/orca-orchestration
hand work away and stop caringownership transfer of a TASK, one direction, no returnthe binary's own orca-cli guide
remember a decision for next monthdurable cross-session fact, project-scopedEngram (mem_save)
shrink the window and keep goingharness compaction, lossy, not addressable, not yours to shapenothing to do
hand the whole SESSION to its own successorthis skillhere

The distinction that matters: compaction keeps what a summarizer judged salient. A handoff keeps what the NEXT actor needs, which is a different set, and it is written by the only party that knows the difference.

When to write one

Manual is the primary trigger and that is by design. The human notices the window filling, says so, and the skill runs. No polling, no nagging, no token spent guessing.

Whether any harness can trigger this automatically is answered, with citations, in .agents/skills/session-handoff/references/auto-trigger.md. Read it before promising the owner an automatic mode.

Write one when any of these is true:

  • the context window is past the owner's threshold (~500k tokens unless the owner names a different one; it is a per-owner judgement about where this model starts degrading, not project configuration, so it stays in the conversation and not in a yaml key)
  • the session is about to end with work still in flight
  • the session is about to do something that will itself consume a large slice of the window (a big harvest, a long file read) and the remaining budget will not cover the work after it
  • the owner asks

Do NOT write one when the remaining work fits comfortably in the window. A handoff costs a real slice of context to produce, and a successor launched too early pays the startup tax for nothing.

The three steps

  1. Capture. Walk .agents/skills/session-handoff/references/capture-contract.md section by section. Every section is mandatory; a section with nothing in it is written as an explicit none line, never omitted. Omission is indistinguishable from forgetting, and the successor cannot tell which happened.
  2. Write. Fill .agents/skills/session-handoff/templates/handoff.md to <<PRIMARY_ROOT>>/.session/handoffs/<session-name>-handoff-NN.md. Naming contract below.
  3. Launch the successor. Follow .agents/skills/session-handoff/references/successor-launch.md. With a runtime, this session launches it. Without one, this session prints the line and the human pastes it.

Naming and location contract

<<PRIMARY_ROOT>>/.session/handoffs/<predecessor-session-name>-handoff-NN.md
  • .session/ is gitignored, and a handoff is disposable by design: it describes one session's state, it is not a project record, and committing it would put a decaying snapshot under version control.
  • It lives in the PRIMARY checkout, <<PRIMARY_ROOT>> (.agents/README.md §"Checkout roots"), even when the session runs in a linked worktree. A handoff written inside a worktree dies with the worktree, and two worktrees of one lineage would each count NN from their own empty directory. The successor still launches in the SAME worktree as the predecessor; only the file lives in the primary. A handoff written into a worktree's own .session/ by mistake is rescued by bun run worktree:audit --rescue before the worktree goes.
  • NN is zero-padded, two digits, starting at 01, incrementing across the whole lineage. List <<PRIMARY_ROOT>>/.session/handoffs/ before choosing; never assume, and never count from a worktree's own .session/.
  • The successor's session name is the handoff file's basename without the extension. That is the entire naming rule, and it makes the lineage readable from the file list alone: <base>, then <base>-handoff-01, then <base>-handoff-01-handoff-02. Long names are the point; a lineage you cannot read is a lineage you cannot audit.
  • <predecessor-session-name> is the session= value of the AGENT IDENTITY: line the prompt hook injects (the same label the commit trailers carry), with spaces and parentheses replaced by -. When it reads unknown, ask the owner for a name rather than inventing one.
  • A durable fact that outlives the session does not belong in the handoff. It belongs in Engram, in the repo, or in the tracker. The handoff cites it.

Hard rules

  1. Label every claim measured, read or predicted. The predecessor's guesses about what the successor will find are useful and are also the first thing to go stale. A predicted branch stated as fact sends the successor down a path that no longer exists. Measured means: this session ran it and read the output. Read means: it came from a document and was believed.
  2. Mark perishable state PERISHABLE, with the wall-clock time it was measured. Running workers, open mailboxes, in-flight PRs and live runs decay between writing and reading. The successor's instruction for anything marked perishable is: re-verify before acting, not act then discover.
  3. Perishable beats priority. If a perishable item needs attention before the priority list, say so in the same line. A successor that follows a stale priority order while a live worker waits has done exactly what the handoff was supposed to prevent.
  4. Ids are copied, never described. A run id, a dispatch id, a terminal handle, a session id, a PR number, a tracker key, a commit SHA: verbatim, in backticks, in a form that can be pasted. "the worker from earlier" is not an id.
  5. Every path is absolute. The successor may start in a different directory.
  6. Name what is NOT done and why. A handoff that reads as an unbroken success is a handoff that hid something, and the hidden thing is always what bites.
  7. Write the file before launching the successor. They are not separable, and the order is not reversible: a successor that starts first reads a file that does not exist yet.
  8. Harness parity. The successor runs on the same harness as the predecessor. A handoff shaped for one agent's conventions handed to another is a translation problem nobody asked for.
  9. No AI attribution anywhere, ever (Critical Rule #3). A handoff is a repo artifact in English, even when the conversation is not.
  10. Do not delete the predecessor's handoff. The lineage is the audit trail. Writing -handoff-02 never removes -handoff-01.
  11. No secrets in the file. A handoff names the variable a credential lives under ($STAGING_USER_PASSWORD), never its value; a session cookie, a token or the path of an .auth/** state file stays out (Critical Rule #1; AGENTS.md §3 SESSION MATERIAL IN A DISPATCH).

References

FileWhat it holds
.agents/skills/session-handoff/references/capture-contract.mdthe ten mandatory sections, what each one is for, and the failure mode that justifies it
.agents/skills/session-handoff/references/successor-launch.mdlaunching the successor with and without a runtime, per harness; why this is not orchestration
.agents/skills/session-handoff/references/auto-trigger.mdwhether any harness exposes context size to a hook, with citations and a verdict
.agents/skills/session-handoff/templates/handoff.mdthe skeleton to fill

Related doctrine: .agents/skills/agentic-qa-core/references/session-footer-contract.md (what a session reports at close), .agents/skills/agentic-qa-core/references/briefing-template.md (the 7 components, which a handoff deliberately is NOT: a briefing scopes a task, a handoff transplants a session).

Matgeliwwert Fichieren

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Session Handoff?

Compact an entire agent session into a handoff document so a NEW session resumes exactly where this one stopped, as if the context window had been extended rather than reset. Use when the context window is getting high (default threshold ~500k tokens, beyond which the model degrades and starts inventing), when work must continue past the end of this session, or on any variant of: hagamos el handoff, pasa el contexto a otra sesion, continua esto en otra sesion, hand this session over, continue this in a fresh session, write a handoff, session handoff. Produces <<PRIMARY_ROOT>>/.session/hando...

Firwat Session Handoff op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Session Handoff besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt amplaz vun engem Abonnement pro Benotzerplaz. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Session Handoff an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/upex-galaxy/agentic-qa-boilerplate/tree/main/.agents/skills/session-handoff an. TypingMind liest d'Datei SKILL.md, bündelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Session Handoff benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Session Handoff benotzen?

Esou vill Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Session Handoff domat benotzen – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama a méi – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Session Handoff gratis?

Jo. De Skill gëtt vum upex-galaxy ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbaart Pak vun Instruktiounen, dat engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt en nokënnt a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a keng Lafzäitëmfeld a funktionéiere mat all Modell.

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇