← Back to articles

Resuming Codex and Grok Work in Claude Code and Devin

4 min read

A Codex session that ends halfway through a task strands its context. The goal, the corrections you made along the way, and the parts that actually work all live in a session log the next agent cannot see. Copying the transcript by hand burns the new agent’s context on noise, and pasting raw history drags secrets and stale claims into a fresh session.

resume-plugin-cc is a plugin that automates the handoff. It reads a finished Codex or Grok session, builds a bounded and redacted summary packet, attaches a snapshot of the current Git working tree, and asks the new session to verify the work before continuing. The same plugin installs in Claude Code and in Devin, and the source is public at BenBish/resume-plugin-cc. The project entry has the short version; this post covers how it works and what it does not do.

The Design: A Read-Only Broker

The plugin is a thin broker, the same shape as local-model-plugin-cc and grok-plugin-cc. It does not reimplement an agent runtime. It reads session history through supported interfaces and hands the result to whichever harness is already running.

History extraction is read-only and uses no source-model credits. Codex history is read through the documented App Server protocol (thread/list and thread/read). Grok history is read with grok sessions list and grok export. The broker is plain Node.js 20 code with no runtime npm dependencies and no build step.

The import path produces a versioned, size-bounded JSON handoff (the schema is published in the repo as handoff-v1). It keeps the goal, corrections, plans, and useful assistant context, and drops hidden reasoning and raw or binary output. Before anything reaches the new session, common secrets are masked: API keys, authorization headers, private keys, credential-bearing URLs, and secret-like environment assignments. Nothing is written to disk: no transcript cache in the repo and no persistent plugin state directory.

Two rules carry most of the safety story:

  • Imported transcript text is untrusted context, never instructions. The broker never executes commands found in a transcript, and the skill prompts tell the resuming agent to treat quoted messages as history to reconstruct, not directions to follow.
  • The current working tree is the source of truth. The broker inspects Git read-only and attaches a workspace snapshot to the handoff. The receiving agent must inspect that snapshot and verify transcript claims against the files before continuing; the broker does not verify implementation contents against those claims.

The Commands

The user-facing workflows are packaged as portable skills, so they register as the same slash commands in both hosts:

  • /resume:from with no arguments lists recent Codex and Grok sessions for the current repository and lets you pick one.
  • /resume:from codex latest -- finish the implementation imports the newest matching Codex session, briefs the handoff, and continues the supplied task in the same turn.
  • /resume:from grok <session-id> imports a specific Grok session by id.
  • /resume:doctor reports adapter availability: Node version, Git, the Codex and Grok CLIs on PATH, and the resolved repository root. It changes nothing.

Install is two commands in Claude Code (/plugin marketplace add BenBish/resume-plugin-cc, then /plugin install resume@resume) or one in Devin (devin plugins install 'BenBish/resume-plugin-cc#plugins/resume'). Each skill resolves the broker’s location through its host’s own convention, so no cache path needs to be supplied.

There is a third registered skill, resume-runtime. It is model-only and internal: a runtime contract for debugging the broker, not a resume command. If you are looking for the user workflows, /resume:from and /resume:doctor are them.

What Was Verified

The claims above track the merged implementation (PRs #1 and #2, November 2026). Verification on the plugin repo: 31/31 fixture tests pass, lint is clean, and claude plugin validate passes strict on both the marketplace root and the plugin package. The tests isolate HOME/XDG paths and use fake Codex and Grok executables, so they do not establish live integration behavior.

The live rehearsal covered Codex-to-Devin only. A real Codex session left an unfinished word-counter task with 1 of 3 tests passing. A fresh Devin session ran the installed /resume:from codex latest, discovered the session, imported the handoff, and correctly reported that the tree contained no implementation code, only a dirty README.md the transcript did not mention. The agent then finished the task and reached 17/17 passing tests, with output cross-checked against GNU wc. Live Claude Code slash-command invocation was not tested because login was unavailable, and a real Grok session import was not tested because no session was available.

Two limitations:

  • No persistent transcript storage. If the source CLI has purged a session, the plugin cannot recover it. Discovery also depends on the source CLI: if grok sessions list output changes shape, discovery can fail while an explicit session id import still works.
  • Redaction is pattern-based. It masks the common secret formats, not everything. The opt-out flag exists for verbatim imports, and the default stays on.

Why This Shape Works

The alternative to a bounded handoff is a full transcript copy, and it is worse on every axis that matters: context budget, secret exposure, and stale claims. A curated packet forces the new session to verify before it trusts.

The plugin also stays host-agnostic on purpose. Claude Code and Devin get the same commands; the broker is a plain Node script either host can spawn. That keeps the resume workflow from becoming a third agent framework to maintain.

If you regularly start work in one harness and finish it in another, the repository has the install steps and the full handoff schema.

resume-plugin-cc built with Barge.