Agent Transcript Parser banner
Juliusolsson05 Juliusolsson05

Agent Transcript Parser

Development community

Description

Bidirectional, round-trip-lossless converter between Claude Code and Codex transcript formats — switch providers mid-conversation and resume in the other CLI.

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

agent-transcript-parser

An evidence-driven transcript engine for agent providers.

The package converts each provider into a shared conversation document and projects that document into any registered provider. It does not contain a Claude-to-Codex translator or a Codex-to-Claude translator:

Claude ─┐
Codex  ─┼─> ConversationDocument ─> Claude / Codex / future provider
Future ─┘

That hub shape is the main architectural contract. Supporting another provider requires one decoder plus that provider's output projectors; it does not require pairwise translators to every provider already supported.

Profiles

Archive and native resume are intentionally different APIs:

  • projectArchive favors preservation. Unknown records can survive as bounded, non-recursive provenance.
  • projectNativeResume emits only the provider-native subset supported by a named evidence profile. Unsupported data is dropped or repaired and reported.

Every projection returns a structured report describing preservation, loss, demotion, repair, synthesis, and identity changes. A green archive test is not a claim that a provider CLI can resume the result.

Basic use

import {
  classifyClaudeDocument,
  codexNativeResumeProjector,
  decodeClaudeConversation,
  decodeJsonl,
} from 'agent-transcript-parser'

const raw = decodeJsonl(sourceText)
const classified = classifyClaudeDocument(raw)
const conversation = decodeClaudeConversation(classified.records)
const projected = codexNativeResumeProjector.projectNativeResume(conversation, {
  targetSessionId: crypto.randomUUID(),
  now: new Date().toISOString(),
  cwd: '/project',
  cliVersion: '0.144.6',
  modelProvider: 'openai',
  model: configuredModelId,
})

console.log(projected.values)
console.log(projected.report)

Context and compaction planning

The parser owns decisions that can be derived from a `ConversationDocument`; the host application owns live process I/O, clocks, cancellation, and UI. Use the typed p