{
  "markdown": "<p align=\"center\">\n  <img src=\"docs/assets/rebinder-hero.png\" alt=\"Rebinder brand mark and wordmark\" width=\"100%\" />\n</p>\n\n<h1 align=\"center\">Rebinder</h1>\n\n<p align=\"center\">\n  Cross-harness session continuity for coding agents.\n</p>\n\n<p align=\"center\">\n  <a href=\"https://bahadirarda.github.io/rebinder/\">Website</a> ·\n  <a href=\"https://github.com/bahadirarda/rebinder/releases\">Releases</a> ·\n  <a href=\"index.md\">Documentation</a> ·\n  <a href=\"CHANGELOG.md\">Changelog</a> ·\n  <a href=\"CONTRIBUTING.md\">Contributing</a> ·\n  <a href=\"SUPPORT.md\">Support</a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://github.com/bahadirarda/rebinder/actions/workflows/ci.yml\"><img alt=\"ci\" src=\"https://img.shields.io/github/actions/workflow/status/bahadirarda/rebinder/ci.yml?branch=main&style=flat-square&label=ci&labelColor=0b0f19&color=2563eb\"></a>\n  <a href=\"https://github.com/bahadirarda/rebinder/releases\"><img alt=\"latest release\" src=\"https://img.shields.io/github/v/release/bahadirarda/rebinder?display_name=tag&style=flat-square&label=release&labelColor=0b0f19&color=22d3ee\"></a>\n  <img alt=\"Claude to Codex transfer MVP\" src=\"https://img.shields.io/badge/status-transfer_MVP-2563eb?style=flat-square&labelColor=0b0f19\">\n  <img alt=\"calendar versioning\" src=\"https://img.shields.io/badge/versioning-CalVer_0.YYYYMMDD.N-22d3ee?style=flat-square&labelColor=0b0f19\">\n  <img alt=\"rust 1.92\" src=\"https://img.shields.io/badge/rust-1.92-e8e2d5?style=flat-square&labelColor=0b0f19\">\n</p>\n\n<p align=\"center\">\n  Inspect, validate, and safely carry portable coding-agent session state across harness boundaries.\n</p>\n\n> [!IMPORTANT]\n> Rebinder can transfer a local Claude Code session into a native Codex thread\n> and immediately open it in the session's recorded workspace. Large-session\n> handoffs first create a visible continuation brief from the transferred\n> context, so the opened thread has an explicit current objective and next\n> action. The user stays in Rebinder for the whole operation. Both transfer\n> directions are operational. Claude-to-Codex uses Codex's native\n> importer or bounded thread APIs. Codex-to-Claude exports a bounded canonical\n> checkpoint and opens a deterministic native Claude session through Claude's\n> supported start/resume CLI. A missing workspace still fails closed by\n> default; explicit `--recover-worktree` can recreate only an exact, unlocked\n> worktree that Git still registers.\n> An optional Claude Code plugin can also observe Claude.ai's documented\n> five-hour and seven-day usage windows, ask once before a configured limit,\n> and hand an accepted session to the enclosing `rebinder claude` process.\n\n## Install\n\nPublished releases provide checksum-verified native binaries for Linux, macOS,\nand Windows.\n\nVisit the [Rebinder website](https://bahadirarda.github.io/rebinder/) for the\nproduct overview, platform installers, current capability boundary, and project\ndocumentation.\n\nLinux or macOS:\n\n```bash\ncurl --proto '=https' --tlsv1.2 -LsSf \\\n  https://github.com/bahadirarda/rebinder/releases/latest/download/install.sh | sh\n```\n\nWindows PowerShell:\n\n```powershell\nirm https://github.com/bahadirarda/rebinder/releases/latest/download/install.ps1 | iex\n```\n\nPin an exact calendar release with `REBINDER_VERSION=v0.20260818.0` on Unix or\n`$env:REBINDER_VERSION='v0.20260818.0'` on Windows. Set\n`REBINDER_INSTALL_DIR` to choose the destination.\n\nEvery installer downloads the platform archive and release-owned `SHA256SUMS`,\nverifies the archive before extraction, validates its `release.json` identity,\nstages the replacement, and checks the installed CLI version before committing\nthe update.\n\nTo build the current source:\n\n```bash\ngit clone https://github.com/bahadirarda/rebinder.git\ncd rebinder\ncargo install --locked --path .\n```\n\n## Transfer Claude Code to Codex\n\nRebinder discovers Claude sessions through Codex's external-agent API and\nleaves existing Claude and Codex setup unchanged. Small transcripts use the\nnative session importer. For large transcripts, Rebinder creates or resumes a\nnative Codex thread and injects a bounded, role-preserving checkpoint through\nthe Codex app-server, avoiding an oversized imported history. It then asks\nCodex for a concise, visible continuation brief grounded in those injected\nitems before opening the thread. Both paths finish by opening Codex from\nRebinder in the source workspace; users do not need to run a separate `codex\nresume` command. While preparation is running, Rebinder prints each blocking\nstage to stderr—discovery, strategy resolution, import or checkpoint injection,\ncompaction, activation recovery, and continuation-brief generation—so the CLI\ndoes not appear idle during app-server or model work.\n\nList the Claude sessions Codex can currently detect, including their IDs,\nrecorded workspaces, states, and recommended transfer strategies:\n\n```bash\nrebinder sessions claude\nrebinder sessions claude --json\n```\n\nOpen the interactive session picker, move with the arrow keys, and press Enter:\n\n```bash\nrebinder transfer --from claude --to codex\n```\n\nPress Esc to cancel without importing. To bypass the picker, transfer a\nspecific session by ID:\n\n```bash\nrebinder transfer SESSION_ID --from claude --to codex\n```\n\nIn a non-interactive shell, omitting the ID selects the most recently updated\nsession whose recorded workspace or Git worktree matches the current directory:\n\n```bash\nrebinder transfer --from claude --to codex\n```\n\nArguments after `--` are passed to the Codex process that Rebinder opens after\nbinding the target thread:\n\n```bash\nrebinder transfer SESSION_ID --from claude --to codex -- --search\n```\n\nThe default `--strategy auto` uses Codex's native full import for source files\nup to 512 KiB. Larger sources use a context-safe handoff containing the latest\nClaude compact summary and at most 40,000 characters of recent visible user and\nassistant text. User and assistant roles are retained instead of flattening the\nhistory into one prompt. Thinking, tool calls, and tool results are excluded.\nThe first transfer of each handoff revision starts one read-only Codex model\nturn to turn that hidden prompt history into a visible continuation brief. The\nactivation prompt forbids tool calls and file changes, but it consumes normal\nCodex model tokens. Rebinder does not start it again for an unchanged revision.\nActivation success follows the app-server event contract: the final\n`item/completed` `agentMessage` is authoritative for the visible brief, while\n`turn/completed` supplies the final turn status.\nOverride the decision explicitly when diagnosing compatibility:\n\n```bash\nrebinder transfer SESSION_ID --from claude --to codex --strategy handoff\nrebinder transfer SESSION_ID --from claude --to codex --strategy full\n```\n\nIf an older full import fails with `Codex ran out of room in the model's context\nwindow`, leave that thread in place and rerun the transfer with the default\nstrategy or `--strategy handoff`. Rebinder creates or reuses a separate bounded\nCodex thread for that source session.\n\nThe transfer requires an installed Codex CLI, locally stored Claude Code\nsession data visible to Codex, and the session's recorded workspace to still\nexist. The current Codex discovery surface returns up to 50 chats from the last\n30 days. Repeating a transfer resumes the strategy-specific Codex thread.\nContext-safe handoffs are append-only and inject a new bounded checkpoint only\nwhen the visible conversation or compact summary changes. Updates to an\nexisting handoff thread are compacted through Codex's native API before\nRebinder creates the new continuation brief and opens Codex. Their local JSONL\nfiles also hold Rebinder's retry-safe injection, compaction, and activation\nledger, live in the platform data directory, and are private to the current\nuser where the platform supports file permissions. An interrupted activation\nis recovered by its source-revision marker instead of creating a duplicate\nbrief.\nLegacy flattened handoff bindings are left intact and upgraded into a fresh\nrole-preserving thread the first time this format is used.\n\n## Enable proactive Claude-to-Codex handoff\n\nRebinder can install an opt-in personal Claude Code plugin that watches the\nprovider's documented rate-limit status and offers a transfer before the source\nwindow is exhausted:\n\n```bash\nrebinder continuity enable claude --to codex\nrebinder claude\n```\n\nThe default policy offers at 90% of the five-hour window or 85% of the\nseven-day window. Change either threshold during enablement:\n\n```bash\nrebinder continuity enable claude --to codex \\\n  --five-hour-threshold 95 --seven-day-threshold 80\n```\n\nEnablement first requires `codex login status` to succeed. It installs the\n`rebinder-continuity` plugin under the configured personal Claude skills\ndirectory and wraps, rather than discards, an existing Claude status-line\ncommand. Restart an active Claude Code session after enabling the plugin.\n\nClaude Code exposes rate-limit fields only for eligible Claude.ai subscribers\nafter the first API response. Missing fields create no offer. A threshold\ncrossing creates one offer for that source session and provider reset window;\nClaude asks whether to continue in Codex. Rebinder records neither acceptance\nnor a transfer from an ambiguous response. A decline stays quiet for the same\nwindow.\n\nAfter an explicit acceptance, enter `/exit`. If the source was opened through\n`rebinder claude`, the waiting Rebinder process prepares the existing normal\ntransfer and opens Codex automatically. The plugin never nests an interactive\nCodex TUI inside a Claude hook or tool process. If Claude was opened directly,\nuse the exact fallback printed after acceptance:\n\n```bash\nrebinder continuity resume --offer OFFER_ID\n```\n\nIf Claude Code reaches the provider limit before a proactive question can\ncomplete, the same plugin records only its documented `StopFailure` event when\nthe error type is `rate_limit`. The failed model turn cannot approve anything.\nRebinder emits a terminal notification and waits for Claude Code to exit. A\nsession opened through `rebinder claude` then asks locally whether to continue\nin Codex. A direct Claude launch uses the same explicit local question:\n\n```bash\nrebinder continuity rescue\n```\n\nThe rescue is deduplicated for the failed transcript revision. An active\ndecline is respected, no Codex process starts on an ambiguous or negative\nanswer, and non-interactive use fails unless the operator supplies the explicit\n`--yes` consent flag. Both `resume` and `rescue` refuse to start a target TUI\nwhile still running inside the Rebinder-owned Claude process.\n\nInspect the policy, latest observation, target availability, and offer ledger,\nor remove the integration and restore the exact previous status-line value:\n\n```bash\nrebinder continuity status\nrebinder continuity status --json\nrebinder continuity disable claude\n```\n\nClaude Code permits one custom status-line command, so Rebinder owns that\nwrapper while continuity is enabled. If another tool replaces it, disablement\nfails closed instead of overwriting the new value. Claude Code's normal custom\nstatus-line footer changes still apply. Continuity state contains sensitive\nsession IDs, workspace paths, usage percentages, and reset times; it is stored\nprivately in Rebinder's platform data directory where the OS supports private\npermissions. The plugin shares the product's `0.YYYYMMDD.REVISION` CalVer and\ndoes not have a separate SemVer lifecycle.\n\n## Transfer Codex to Claude Code\n\nList Codex threads without resuming them, then continue one in Claude Code:\n\n```bash\nrebinder sessions codex\nrebinder transfer --from codex --to claude\nrebinder transfer THREAD_ID --from codex --to claude\n```\n\nOmitting the ID opens the same arrow-key picker in a terminal; non-interactive\nomission selects only the newest Codex thread whose recorded workspace matches\nthe current directory. Options after `--` are passed to Claude:\n\n```bash\nrebinder transfer THREAD_ID --from codex --to claude -- --model opus\n```\n\nRebinder reads the Codex thread without resuming it, creates and validates a\ntemporary canonical package, assesses Claude compatibility, and renders a\nbounded continuation artifact. It then starts a deterministic Claude session\nID or resumes that same native session in the recorded workspace. The artifact\nis supplied through a private temporary context file and wrapped as untrusted\nhistorical data. The first response is asked to produce a visible continuation\nbrief without tools; this consumes normal Claude model tokens.\n\nThe artifact and activation marker use a semantic source revision. An\nunchanged repeat opens the existing Claude session without injecting the same\nhistory again. A changed conversation, task, workspace, or repository snapshot\nupdates that session with one new bounded checkpoint. Rebinder-owned binding\nflags such as `--resume`, `--continue`, `--session-id`, `--name`, and\n`--worktree` are rejected after `--`; use the Rebinder session selection\ninstead. `--strategy` remains specific to Claude-to-Codex transfer.\n\n## Recover a missing registered worktree\n\nBoth transfer directions fail before opening the target when the recorded\nworkspace is missing. If that path was a Git worktree and Git still has its\nexact registry entry, opt in to rebuilding its committed checkout:\n\n```bash\nrebinder transfer SESSION_ID --from claude --to codex --recover-worktree\nrebinder transfer THREAD_ID --from codex --to claude --recover-worktree\n```\n\nRebinder first looks for the owning repository in existing ancestors, then in\na bounded set of sibling Git directories. For a sibling or otherwise distant\nmain worktree, remove discovery ambiguity explicitly:\n\n```bash\nrebinder transfer THREAD_ID --from codex --to claude \\\n  --recover-worktree --worktree-repository /path/to/main-worktree\n```\n\nRecovery is deliberately narrower than clone or checkout. The target path must\nnot exist, its parent must already exist, Git must report that exact path from\n`git worktree list --porcelain`, and the registration must be unlocked with a\nvalid local commit. Rebinder uses `git worktree add --force`, then verifies the\nHEAD, branch when attached, and common Git directory before opening the target.\nIt never fetches, clones, overwrites a path, unlocks a worktree, or claims to\nrestore uncommitted changes. Without the opt-in flag, the old fail-closed\nbehavior is unchanged.\n\n## Export canonical session packages\n\nExport a provider session into the seven-document interchange format:\n\n```bash\nrebinder export --from claude SESSION_ID --output ./claude-session\nrebinder export --from codex THREAD_ID --output ./codex-session --json\n```\n\nOmit the ID in a terminal to choose from an interactive provider-native list.\nIn a non-interactive shell, omission selects only the newest session whose\nrecorded workspace matches the current directory. Codex threads can also be\nlisted without resuming them:\n\n```bash\nrebinder sessions codex\nrebinder sessions codex --json\n```\n\nClaude export reads the local Claude Code project store directly and does not\nrequire Codex. Codex discovery uses `thread/list`; export uses\n`thread/read(includeTurns: true)`, which does not resume or subscribe to the\nthread. Rebinder never edits either provider store.\n\nEvery export captures visible user/assistant text, task intent, recorded\nworkspace, readable Git head/change facts, a bounded handoff, and provenance.\nPrivate reasoning, attachment payloads, environment values, remote URLs, and\ntool input/output payloads are excluded by default. Common credential shapes\nin visible text are best-effort redacted. The output directory must be new;\nRebinder creates it as `0700` with `0600` files on Unix, calculates all\nmanifest digests, and validates the completed package before reporting\nsuccess. Review exported visible text before sharing it.\n\n## Other commands\n\nRun native harness commands through Rebinder without changing their arguments:\n\n```bash\nrebinder codex resume --last\nrebinder claude --continue\n```\n\nValidate or inspect a portable session package without starting an agent:\n\n```bash\nrebinder validate ./session-package\nrebinder inspect ./session-package\nrebinder inspect ./session-package --json\n```\n\nReview the target adapter contract and calculate the information-loss boundary\nfor the fields actually used by a package:\n\n```bash\nrebinder capabilities claude\nrebinder compatibility ./session-package --to claude\nrebinder compatibility ./session-package --to codex --json\n```\n\nCreate a bounded provider-neutral continuation artifact after validation and\ncompatibility assessment:\n\n```bash\nrebinder artifact ./session-package --to claude --output ./continuation.md\n```\n\nArtifacts preserve the handoff, task state, repository facts, recorded\nworkspace, provenance, and recent visible conversation text. Tool outputs,\nattachments, environment values, and remote URLs are excluded; every active\nloss is reported before generation. Output files are created with private\npermissions on Unix and are never overwritten.\n\n## What the MVP delivers\n\n| Boundary | Current behavior |\n| --- | --- |\n| Package structure | JSON Schema Draft 2020-12 validation for every canonical document |\n| Integrity | SHA-256 inventory verification before inspection |\n| Filesystem safety | Relative-path confinement, regular-file enforcement, and symlink rejection |\n| Conversation graph | Unique IDs and valid parent references |\n| Provenance | Source adapter identity, transformations, export time, and redactions |\n| Canonical export | Reads Claude locally and Codex through its read-only app-server methods, emits a validated package, and never resumes or mutates the source session |\n| Harness commands | Native arguments, interactive streams, and process status are preserved |\n| Claude discovery | Lists Codex-supported local Claude sessions, sizes, and recommended strategies without printing transcript content |\n| Claude to Codex | Selects interactively or by ID, uses Codex-native import or thread APIs, and opens the native thread from Rebinder in the recorded workspace |\n| Context guard | Injects bounded compact-summary and recent-message items with their user/assistant roles preserved, then creates a visible continuation brief for source transcripts larger than 512 KiB |\n| Repeat transfer | Reuses the strategy-specific thread, ignores metadata-only source churn, and performs compaction and visible activation once per meaningful handoff revision |\n| Proactive continuity | Optional Claude plugin observes documented subscriber usage windows, asks once per reset window, and arms a transfer only after explicit consent |\n| Hard-limit rescue | A documented Claude `StopFailure(rate_limit)` event creates one out-of-band rescue; the local parent or explicit CLI command asks for consent before reusing the normal transfer adapter |\n| Worktrees | Reuses existing worktrees; with explicit opt-in, recreates only an unlocked exact Git registry entry and verifies its committed checkout before target launch |\n| Compatibility | Declares Codex and Claude continuation capabilities and reports package-specific preserved, summarized, omitted, or blocking state in human/JSON form |\n| Continuation artifact | Produces bounded Markdown continuation state from a validated package without tool output, environment values, attachment payloads, or remote URLs |\n| Codex to Claude | Exports a bounded canonical checkpoint, creates or resumes a deterministic native Claude session, prevents duplicate revision injection, and opens it from Rebinder |\n\nThe initial package format is documented in the\n[Interchange Format 0.1.0](docs/format/interchange-format-0.1.md) specification.\nPackage schema versions are independent from product releases.\n\n## Releases and versions\n\nRebinder uses the same calendar release system as pkgshift:\n\n```text\n0.YYYYMMDD.REVISION\n```\n\n`0.20260817.0` is the first release sourced on 2026-08-17;\n`0.20260817.1` is another release from that date. A new day resets the revision\nto `0`.\n\nUser-visible changes carry a Changeset. Merging the automated version pull\nrequest synchronizes Cargo, Bun release metadata, `Cargo.lock`, and the\nchangelog. An annotated `v<version>` tag then builds five native archives,\n`release.json`, verified installers, `SHA256SUMS`, and GitHub artifact\nattestations. crates.io publication is a separate, manually confirmed workflow.\n\nSee the complete [release system](docs/governance/release-system.md).\n\n## Develop\n\nRequirements: Rust `1.92.0` and Bun `1.3.14`.\n\n```bash\nbun install --frozen-lockfile\nbun run check\nbun run build\n```\n\nUseful commands:\n\n```bash\nbun run changeset          # record user-visible release intent\nbun run changeset:status   # inspect pending release intent\nbun run version:next       # preview the next calendar identity\ncargo run -- --help\nsh scripts/test-installer.sh\n```\n\n## Security\n\nSession packages, provider session stores, and context-safe handoff files may\ncontain sensitive workspace and conversation state. Claude-to-Codex transfer\nasks the local Codex app-server to import only the selected small session or to\ninject the bounded role-preserving checkpoint for a large one; it does not\nselect settings, credentials, plugins, skills, or MCP configuration. Rebinder\nstarts one read-only, no-tool model turn to make a new handoff revision visible,\nwhich consumes Codex model tokens. Rebinder never prints handoff content and\nrejects symlinked handoff targets. It fails\nclosed on invalid structure, unsafe paths, unapproved or unverifiable missing workspaces, integrity\nfailures, and provenance mismatches. Report vulnerabilities through the private\nprocess in [SECURITY.md](SECURITY.md), not a public issue.\n\nProvider-neutral continuation artifacts are also sensitive. Rebinder validates\ntheir package first, excludes tool-result payloads and environment values,\ncreates them without overwriting an existing path, and uses mode `0600` on\nUnix. Review an artifact before sharing it because visible conversation and\nhandoff text may still contain private project information.\n\nCanonical exports use the same sensitive-data boundary. Provider-private\nreasoning and payloads are excluded and provenance records redaction counts,\nbut visible user and assistant text is intentionally portable and automated\ncredential redaction is best effort rather than a substitute for review.\n\nCodex-to-Claude transfer writes its bounded artifact only to a private\ntemporary file while Claude is open. The artifact is explicitly fenced as\nuntrusted historical data before it is appended to Claude's invocation\ncontext. A short revision marker and Claude's visible continuation brief remain\nin the native target transcript. Review source conversation text because no\nprompt-injection boundary can make untrusted history equivalent to trusted\ninstructions.\n\nWorktree recovery is an explicit filesystem mutation. Rebinder will not create\nover an existing path, traverse an immediate symlink parent, unlock a registry\nentry, contact a remote, or restore uncommitted state. Review the repository\nand target path before using `--recover-worktree`, especially when supplying\n`--worktree-repository`.\n\n## License\n\nRebinder is available under the [MIT License](LICENSE).\n",
  "bytes": 23191,
  "sha": "dfa93135547c06549078b2de38236755023ed996e1a8cef878444f03b1aa143f",
  "repo_slug": "bahadirarda/rebinder",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/okf_bahadirarda_rebinder_index_md_04b9241d/readme"
}