Native Agent History Import / Importer API for Claude Code, Codex, and Cursor sessions

Feature request for product/service

Cursor IDE

Describe the request

Summary

I built and validated a local migration workflow that imports Claude Code sessions into Cursor Composer history while preserving the original transcript as a handoff artifact, injecting a continuation prompt, backing up Cursor state, and verifying the imported Composer index and bubble schema after migration.

I would like Cursor to support this as a first-class native import flow or official importer API.

Problem

Developers increasingly move active work between Claude Code, Codex, Cursor, and other coding agents. Today, most tools focus on importing rules, skills, plugins, or settings. The missing piece is active agent history:

  • original transcript
  • project path
  • task state
  • decisions already made
  • files touched
  • risks and TODOs
  • next safe action

Without this, switching agents causes context loss. The user has to reconstruct work manually, or a third-party tool has to patch Cursor’s private local database, which is not a safe integration surface.

Current prototype

The local prototype scans Claude Code JSONL sessions, copies each full transcript into a handoff directory, creates a continuation prompt, imports or reuses Cursor Composer sessions, injects a handoff message, backs up Cursor state, and verifies every imported session.

The important design idea is:

Even when the visible Composer history is truncated, Cursor should retain a pointer to the complete source transcript so the next agent can reconstruct the real state before editing anything.

Local validation

On my machine, the current prototype migrated all top-level Claude Code sessions under ~/.claude/projects:

  • source sessions found: 49
  • sessions verified in Cursor: 49
  • skipped sessions: 0
  • Cursor DB missing entries: 0

Each imported session was verified for:

  • Cursor composerData
  • Cursor sidebar/index entry
  • Composer/bubble schema compatibility
  • injected handoff prompt
  • preserved full source transcript

Requested Cursor-native version

Please consider adding:

Settings → Import Agent Setup → Import Agent History

Suggested flow:

  1. Choose source agent.
  2. Select projects and sessions.
  3. Preview what will be imported.
  4. Import with automatic backup.
  5. Preserve source transcripts.
  6. Verify imported Cursor Composer entries.
  7. Show success/failure results.
  8. Provide rollback.

Suggested import sources:

  • Claude Code
  • Codex
  • Cursor backup / another machine
  • Generic JSONL transcript format

Suggested importer API surface:

  • create or update Composer session
  • append user/assistant/tool bubbles
  • preserve source metadata
  • attach handoff transcript references
  • register imported session in Cursor’s GUI index
  • return verification status
  • expose dry-run / preview
  • expose rollback or transaction boundary

Why this matters

Cursor can become the best hub for multi-agent development if users can move live work into Cursor without losing context.

This is not only a convenience feature. It changes whether users trust Cursor with long-running agent work. If importing live context is safe and verified, Cursor becomes the natural place to continue work started in Claude Code, Codex, or another agent.

Ask

Would the Cursor team be open to either:

  1. adding a native Agent History Import flow, or
  2. exposing an official importer API that third-party tools can use safely?

I can share the prototype, local validation outputs, and real migration cases if the team wants to review the design.

Operating System (if it applies)

MacOS

Update: I published the public proposal/plugin scaffold here: GitHub - 0smboy/agent-migration-cursor-plugin: Cursor importer API proposal and safe agent-history migration plugin scaffold · GitHub

It intentionally does not ship the private local DB patcher. The repo contains the importer API proposal, a safe preview-only CLI scaffold, and the local validation summary so Cursor staff can review the desired official surface.

Hey, thanks for such a detailed feature request, and a special thanks for not patching the private local DB. You made a preview-only scaffold and shared the repo instead. That’s the right approach, and it’s respectful to the user base.

The use case is clear. Moving active context between agents like Claude Code, Codex, and Cursor without manually rebuilding it is a real pain point, and it’s already come up in nearby threads like this one: How are people handling context across different AI coding tools?. So this request makes sense.

Honestly, I can’t commit to timelines or guarantee this will ship in the product in this exact form, like a native flow plus a public importer API with dry-run and rollback. I’ll keep the thread open. It’ll help gather votes and measure demand for an official API surface for third-party tools.

Your prototype and validation summary are really helpful. If we end up with specific questions about the desired surface, the team will have something concrete to review in your repo. Thanks for putting it together so cleanly.