gitwtfhub

wtf is chagent?

sirtenzin/chagent — explained in plain English

Analysis updated 2026-05-18

9TypeScriptAudience · developerComplexity · 2/5Setup · easy

TL;DR

A command line tool that converts an AI coding session between Claude Code, Pi, OpenCode, and Codex so you can keep working in a different tool.

Mindmap

mindmap
  root((chagent))
    What it does
      Reads agent sessions
      Converts between formats
      Resumes in new tool
    Tech stack
      TypeScript
      Bun
    Use cases
      Switch coding assistants
      Preserve session history
      List local sessions
    Audience
      Developers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Move an in progress coding session from Claude Code into Pi or another tool.

REASON 2

Find a session automatically across four supported tools using a partial session ID.

REASON 3

List every session chagent can see on your machine.

What's in the stack?

TypeScriptBunCLI

How it stacks up

sirtenzin/chagentdeskulpt/adk-okf-grounded-chatmaximseshuk/payload-plugin-openapi
Stars999
LanguageTypeScriptTypeScriptTypeScript
Setup difficultyeasymoderateeasy
Complexity2/54/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · easy Time to first run · 5min

Installed globally through the bun package manager.

No license information is given in the README.

Wtf does this do

chagent is a small command line tool for moving an in progress AI coding session from one assistant to another without losing the conversation. It can read and write session files from Claude Code, Pi, OpenCode, and Codex, so if you started a task in one of these tools you can continue the exact same conversation, including its history and tool calls, in a different one. Using it is a single command: you give chagent part of a session ID and the name of the tool you want to switch to, and it automatically searches across all four supported tools to find where that session actually lives, converts it, and prints the exact command needed to resume the converted session in the new tool. A companion command lists the sessions chagent can see on your machine. The compatibility table in the project's documentation is detailed about what carries over across every combination of tools: plain text, images, and attachments transfer cleanly everywhere, as do shell, edit, and write tool calls, other tool calls, subagent transcripts, conversation compaction, and model or token usage figures, though Codex drops the recorded cost figure and only shows plain text for what the assistant was thinking rather than any richer formatting. Tool calls that a target assistant does not recognize are still carried over as is, so the underlying model can see them in its history even though the interface may not render them nicely. The tool installs globally through the bun package manager and is aimed squarely at developers who regularly switch between multiple AI coding assistants and do not want to restart a task from scratch each time they do.

Yoink these prompts

Prompt 1
Help me install chagent globally with bun and convert my latest Claude Code session to Codex.
Prompt 2
Explain what happens to tool calls that the target assistant does not recognize.
Prompt 3
Show me how chagent handles subagent transcripts during conversion.
Prompt 4
Walk me through what chagent ls shows me about my existing sessions.

Frequently asked questions

wtf is chagent?

A command line tool that converts an AI coding session between Claude Code, Pi, OpenCode, and Codex so you can keep working in a different tool.

What language is chagent written in?

Mainly TypeScript. The stack also includes TypeScript, Bun, CLI.

What license does chagent use?

No license information is given in the README.

How hard is chagent to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is chagent for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.