Skip to main content

Continue a coding-agent session in Claude Code, Codex, Cursor, or Pi

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

session_handoff-0.1.1.tar.gz (12.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

session_handoff-0.1.1-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

Details for the file session_handoff-0.1.1.tar.gz.

File metadata

  • Download URL: session_handoff-0.1.1.tar.gz
  • Upload date:
  • Size: 12.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.2

File hashes

Hashes for session_handoff-0.1.1.tar.gz
Algorithm Hash digest
SHA256 0167098f0f626d00debcef1e1dec320075f8453a34177a48b2dfebf6320bd2af
MD5 726d1ace104128b18bdf416f41a638da
BLAKE2b-256 32a5346dab9329b1a476780788f06ca3629b7ce8e8d735c244e7233129bb9f8f

See more details on using hashes here.

File details

Details for the file session_handoff-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for session_handoff-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8037e7099822b13f5270317a7732e04905c6937955259ae87adcb3b3597196b2
MD5 5da52f67479aaed61b2d1381a0080d05
BLAKE2b-256 3a56cd4eebafa58294f3a0e99103aff8a627e82a44d7470334b7c939a7b01dce

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page