Skip to content
Back to Blog

Sessions · MCP · Memory · CLI · AI

Cross-Session Memory: Importing Copilot, Claude, Gemini, Cursor, Windsurf, and Codex Sessions into vem

February 15, 20266 min read

Every AI session contains knowledge that should outlive the chat window. Learn how vem sessions captures and imports agent work into your permanent project memory.

The Problem with Ephemeral Agent Sessions

Your AI agent spends an hour working through a complex refactor. It discovers edge cases, makes decisions, and produces working code. Then the session ends — and none of that reasoning is preserved. The next session starts from zero.

vem sessions bridges this gap. It scans for completed agent sessions from Copilot, Claude, Gemini, Cursor, Windsurf, Codex, and other tools, then lets you import the relevant parts into your .vem/ memory so future agents and teammates can benefit from that accumulated knowledge.

Browsing Recent Sessions

vem sessions lists recent agent sessions it has detected for your project, organised by tool (Copilot, Claude, Gemini, Cursor, Windsurf, Codex) and date. Each entry shows the session ID, start time, duration, and a short auto-generated summary of what was worked on.

Browse sessions

# List recent agent sessions
vem sessions list

# Filter by branch
vem sessions list --branch main

Importing a Session into Memory

Once you find a session worth preserving, import it. vem reads the session, extracts key decisions and task completions, and merges them into your .vem/ artifacts — updating CURRENT_STATE.md, changelog, and any open tasks that were touched.

Import a session

# Import a specific session by ID
vem sessions import <session-id>

Linking Sessions to Tasks

Sessions can be associated with specific tasks, giving you a full audit trail: which agent sessions contributed to a task, when, and what they changed. Use vem task sessions to see all sessions attached to a task.

View sessions attached to a task

# See all sessions linked to a task
vem task sessions TASK-042

MCP: Cross-Session Awareness for Agents

When your agent is connected via the vem MCP server, it can call list_agent_sessions() to get a summary of past sessions for the current project. This means your agent starts each session already knowing what previous agents attempted, where they left off, and what decisions were made — without you needing to re-explain.

Combined with save_session_stats(), the MCP server records metrics from the current session (tokens used, tasks completed, decisions made) so the next agent in the chain has full context on how the project is evolving.

  • list_agent_sessions() — browse past sessions from any agent tool
  • save_session_stats() — record current session metrics for continuity
  • vem sessions import — merge session knowledge into .vem/ memory
  • vem task sessions <id> — audit which sessions touched a task