Agentswap banner
bojieli bojieli

Agentswap

Development community

Description

Fail over Claude Code and Codex across subscriptions, API keys, and third-party providers; wait through quota resets; teleport sessions between harnesses.

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

agentswap

[![CI](https://github.com/bojieli/agentswap/actions/workflows/ci.yml/badge.svg)](https://github.com/bojieli/agentswap/actions/workflows/ci.yml) [![Go reference](https://pkg.go.dev/badge/github.com/bojieli/agentswap.svg)](https://pkg.go.dev/github.com/bojieli/agentswap) [![Dependencies: none](https://img.shields.io/badge/dependencies-none-brightgreen)](#security-and-privacy) [![License: MIT](https://img.shields.io/badge/license-MIT-blue)](LICENSE)

**Keep coding when an AI subscription runs out, a provider becomes flaky, or you need to continue in a different coding-agent harness.**

Why agentswap exists

A coding-agent subscription can be expensive and still run out in the middle of a long refactor. A second subscription may also reach its weekly limit, and pay-as-you-go API usage can cost much more than the subscription.

Third-party providers such as Krill AI can be a useful lower-cost fallback, but any provider can be intermittent. When a request fails, repeatedly typing `continue` is a poor way to recover the context you already built.

There is another common dead end: Claude Code has no usable capacity, while Codex still has credits (or the other way around). Starting over in the other harness throws away the session history.

agentswap is built for these moments. It keeps your credentials local, makes recovery explicit, and preserves the recorded conversation when you move.

Three ways it keeps work moving

Need What agentswap does Main command
More capacity in the same harness Pools subscriptions, API keys, and active same-protocol provider overrides; fails over only when an account is actually unavailable. agentswap import, agentswap run
A temporary limit or outage Waits through a known reset, retries transient overload, and resumes a session after a wait longer than a client socket should remain open. agentswap run -- ...
Another harness still has capacity Validates and translates the