# Giving Agents a Reliable Handoff

2026-06-09. A useful agent handoff needs both a deliberate memory capture and a small, dependable record of the worktree at the turn boundary.

Language: en
Canonical: https://avanticomplex.com/en/blog/giving-agents-a-reliable-handoff/

Published: 2026-06-09T12:00:00.000Z

An agent cannot hand work to the next person or process by relying on a chat transcript alone. The relevant decision may be buried in many turns, and the state of the repository may have changed after the decision was made. The June 9 VALESKA work adds two deliberately different aids: a shared command for a meaningful memory capture, and a Stop hook that records a small mechanical snapshot when an agent returns control. A separate launcher makes the memory service start from any repository. Together they address repeatability at the handoff point, while leaving judgment about what matters with the agent or operator.

## Capture is deliberate; the turn log is mechanical

The new capture helper posts one thought to VALESKA's memory endpoint. It accepts a thought type, project, agent identifier, tags, visibility scope, and content. When no project is supplied, it detects the repository and applies a limited slug override map. Its content can arrive through standard input, which avoids shell quoting problems when the handoff contains paths, command output, or multi-line reasoning. A successful request returns the thought identifier; a failed request exits with an error. This is an implemented common path for an agent to record a synthesized decision, action, insight, or session summary.

The Stop hook has a different job. It reads the hook input, asks Git for the branch and working-tree status, then appends one JavaScript Object Notation (JSON) line with a timestamp, session identifier, current directory, branch, and up to fifty changed files. It deliberately does not post a memory item for every turn. A turn-ending event is low-signal by itself, and automatic prose at that frequency would make later recall worse. The log is evidence for a later synthesis, not a substitute for it. Its failure behavior is also intentionally tolerant: a logging problem must not prevent the agent from returning control.

## A stable service entry point

The Model Context Protocol (MCP) launcher addresses a quieter source of handoff failure. A standard input/output (stdio) client starts a server in the client's current directory, which may be any project rather than the VALESKA repository. The launcher changes to the VALESKA root, places that root on the Python import path, and runs the server in the same process. That makes relative configuration and package imports resolve from the expected location without leaving a wrapper process behind. It is a launch fix, not a claim that the service is available, authorized, or healthy in every environment.

## What this evidence establishes

The source commits establish that these scripts exist with the stated behavior. They do not establish that every agent adopts the capture helper, that each session produces a good summary, or that the resulting memory is useful on retrieval. Those are observed-practice questions. The working question is whether a short mechanical log plus a consciously written capture lets a new agent reconstruct a task accurately enough to continue without reopening the entire transcript. The next test is to use this path across several real handoffs, compare the reconstructed state with the repository, and inspect whether the captured records are specific enough to be retrieved and acted on.

**Historical basis:** 2026-06-09 repository milestones, commits `94ec996` and `88bb67a`.


## Translations
- en: https://avanticomplex.com/en/blog/giving-agents-a-reliable-handoff/
- es: https://avanticomplex.com/es/blog/giving-agents-a-reliable-handoff-es/
- pt: https://avanticomplex.com/pt/blog/giving-agents-a-reliable-handoff-pt/
