Skip to main content

Session Handoff

note: this project was prototyped rapidly (in about 15 minutes) by gpt-5.6-sol. use at your own discretion.

Continue a coding task in another coding agent by pointing it to the previous agent's session file.

Supported agents:

  • Claude Code
  • Codex CLI
  • Cursor
  • Pi

Session Handoff does not summarize the conversations. It only searches for the file path of latest coding session transcript belonging to the current working directory.

Install

uv tool install session-handoff
# or
pipx install session-handoff

From a local checkout:

uv tool install .

Use

Run handoff inside the project you want to continue:

# Launch Codex with the latest Claude Code session.
handoff claude codex

# Print the prompt instead of launching the destination.
handoff claude codex --prompt

# All directions are supported.
handoff codex pi
handoff pi claude
handoff cursor codex
handoff claude cursor

The generated prompt is:

Read the previous coding session at <path>, understand the task, inspect the current working directory, and continue from where the previous agent stopped.
Ask clarifying questions if required.

Session selection

Handoff matches the current working directory against metadata in each agent's local history and chooses the matching file with the newest modification time.

Agent Default history location
Claude Code ~/.claude/projects/*/*.jsonl
Codex ~/.codex/sessions/**/rollout-*.jsonl
Cursor ~/.cursor/projects/*/agent-transcripts/*/*.jsonl
Pi ~/.pi/agent/sessions/**/*.jsonl

It fails when no session matches the current directory.

Native location overrides are supported:

  • CLAUDE_CONFIG_DIR
  • CODEX_HOME
  • CURSOR_DATA_DIR
  • PI_CODING_AGENT_SESSION_DIR
  • PI_CODING_AGENT_DIR

Development

Run the tests:

PYTHONPATH=src python -m unittest discover -s tests -v

Release files for session-handoff 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for session-handoff 0.1.1
File Size Uploaded
session_handoff-0.1.1.tar.gz 12.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for session-handoff 0.1.1
File Interpreter ABI Platform
session_handoff-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 25.5 kB

Release files / session_handoff-0.1.1.tar.gz

Download URL session_handoff-0.1.1.tar.gz
Size 12.4 kB
Tags Source
SHA-256 checksum
How to use checksums
0167098f0f626d00debcef1e1dec320075f8453a34177a48b2dfebf6320bd2af
BLAKE2b-256 checksum
How to use checksums
32a5346dab9329b1a476780788f06ca3629b7ce8e8d735c244e7233129bb9f8f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.2

Release files / session_handoff-0.1.1-py3-none-any.whl

Download URL session_handoff-0.1.1-py3-none-any.whl
Size 13.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8037e7099822b13f5270317a7732e04905c6937955259ae87adcb3b3597196b2
BLAKE2b-256 checksum
How to use checksums
3a56cd4eebafa58294f3a0e99103aff8a627e82a44d7470334b7c939a7b01dce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.2

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page