---
name: opencognitos-handoff
title: handoff
kind: skill
description: >
  Write a handoff note so another agent (or a fresh session) can continue the
  work without losing context. Use when the context window is getting full,
  before ending a session with unfinished work, when handing a task to another
  agent, or when the user says "hand off", "wrap up" or "continue later".
updated: 2026-12-05
authored_by: OpenCognitOS
author_url: https://github.com/OpenCognitOS
source_url: https://github.com/OpenCognitOS/skills/tree/HEAD/handoff
brought_by: kt
license: MIT
---

# Handoff

A new session knows nothing. Everything not written down is lost: decisions, dead ends, the reason a file looks strange. A good handoff lets the next agent start working in two minutes instead of re-discovering the last two hours.

## When

- The context is more than ~70% full, or you notice you are forgetting earlier details.
- The task is not finished and the session ends.
- Another agent (or another CLI) should take over a part.

Write the handoff **before** you run out of room, not after.

## Where

Write to `HANDOFF.md` in the project root (or `.handoff/<task>.md` when several tasks run in parallel). Overwrite the old one; history is in git. Do not commit it unless the user wants that.

## Template

```markdown
# Handoff: <task in one line>
Date: <YYYY-MM-DD HH:MM> · From: <agent/CLI> · Branch: <branch> · Last commit: <hash>

## Goal
<What the user actually wants, in their words if possible. Include the done criterion.>

## State
- Done: <what works now, with files>
- In progress: <what is half-done, exactly where you stopped>
- Not started: <remaining steps>

## Decisions
- <decision> — because <reason>. (Things the next agent must not undo.)

## Dead ends
- <what you tried that did not work and why>

## Open questions
- <things only the user can answer>

## Next step
<The single concrete action to do first, e.g. "run `npm test -- queue` and fix the 2 failing cases in queue.test.ts".>

## Files that matter
- `path/to/file` — <why>
```

## Rules

- Be specific: file paths, function names, commands, error messages. "Fixed the bug" is useless; "`parseDate` returned UTC, now uses local time (src/date.ts:42)" is useful.
- Record uncommitted changes: run `git status` and list them, or commit them to a WIP branch if the user allows.
- Keep it under one screen. Link to files instead of pasting them.
- If tests are red, say which and why.

## Picking up a handoff

1. Read `HANDOFF.md` completely before doing anything.
2. Check that the branch and last commit match. If not, find out what changed.
3. Run the tests to confirm the described state.
4. Start with "Next step". If something in the note is unclear or contradicts the code, trust the code and tell the user.

In OpenCognit, mention the handoff file in your task report: `"$OPENCOGNIT_CLI" report <task-id> --status blocked --summary "Handoff in HANDOFF.md"`.
