HC(1)User CommandsHC(1)

NAME

hc - move a coding session between agents and resume it natively

SYNOPSIS

hc --from HARNESS --to HARNESS [SESSION] [--write] [--dest-cwd DIR]
hc list --from HARNESS

DESCRIPTION

Your harness hit a rate limit 80% through the fix. It cannot even write you a handoff doc, because the thing that would write it is the thing that is down.

hc reads the session transcript straight off disk, rewrites it into the target harness's native format, and prints the exact resume command. The dead harness never needs to run again, and your quota never needs to come back. Two seconds, and you keep going where you left off.

EXAMPLES

Your harness dies mid-fix:

> fixing the failing payments test...
✗ usage limit reached · resets in 1h      (30 minutes to ship)

See what is recoverable, then move it:

$ hc --from claude --to codex
from   : claude  (ce0dc35e...)
to     : codex
records: 243  (78 tool calls)
title  : "Fix the failing payments test"
(dry run; pass --write to create it)

$ hc --from claude --to codex --write
✓ wrote rollout · resume with:

$ codex resume ce0dc35e      full history, keep going

HOW IT WORKS

Common interface. Every harness maps to four records: user message, assistant reply, tool call, tool result. The universal floor that guarantees any pair converts and resumes.

N² enrichment. Surplus the floor cannot hold (session titles, modes) rides a sparse (from, to) map layered on top. It never re-encodes the common records, only the extras.

Dual streams. Writes both the model-context stream and the UI scrollback, including exec and diff tool cards, so history renders in the target harness instead of merely resuming.

Ragged tails. The source usually died mid-tool-call. Every orphaned call gets a synthetic result, or the resumed agent would reject the history. The normal case, handled.

INSTALLATION

Stdlib only, zero dependencies. An escape hatch cannot ask you to resolve a dependency tree while you are on fire.

$ pipx install harness-convert
$ npm i -g @theharshitsingh/hc
$ brew install harshitsinghbhandari/tap/harness-convert

SUPPORTED HARNESSES

claude    Claude Code   ~/.claude
codex     Codex         ~/.codex
opencode  OpenCode      ~/.local/share/opencode

Any direction between them. Converting into OpenCode writes an import file; resume with opencode import FILE then opencode -s ID (hc prints the exact commands). Within a harness, sessions also relocate freely across working directories.

SEE ALSO

github.com/harshitsinghbhandari/harness-convert

MIT · built by Harshit Singh Bhandari

harness-convert 0.2.02026-07-19HC(1)