It was 4:07 PM. I was three files deep into a refactor, the agent finally understood the weird shape of my billing module, and then:
You've reached your usage limit. Try again at 6:00 PM.
I had two other coding agents installed and signed in. Both had quota left. Neither had the faintest idea what I'd spent the last two hours doing.
So I did what everyone does. I opened the second agent, re-explained the goal, pasted the plan, watched it read twenty files to rebuild context I had already paid for, and then watched it cheerfully undo a decision I'd made on Tuesday - because nobody told it that decision existed.
That afternoon is the reason I built mixai.
npm install -g mixai-cli
The actual problem isn't the limit. It's that context is trapped.
Most of us now have more than one AI coding agent installed. A Claude Code subscription. Codex through a ChatGPT plan. Cursor's free tier. Antigravity's free tier. On paper that's a lot of capacity.
In practice it behaves like four separate, amnesiac contractors who refuse to talk to each other. Every one of them keeps its context in its own private session format, in its own directory, and none of them can read the others'. So the moment one stops - quota, rate limit, or just "I'd like a second opinion on this" - you personally become the integration layer. You're the one carrying the objective, the constraints, and the "no, we tried that, it didn't work" across the gap.
That's the expensive part. Not the limit - the re-explaining.
What mixai does
mixai is a small command-line tool that sits beside the agents you already use. It doesn't replace them, doesn't proxy your requests, doesn't touch your API keys, and doesn't send anything to a server. It does two things:
1. It hands your work off between agents in one command.
mixai switch codex --from claude
That writes a checkpoint of your current session to a local .mixai/ folder - the objective, the conversation, your branch and HEAD, a patch of your uncommitted changes, and the project's accumulated decisions - then opens Codex with a continuation prompt pointing straight at it. You type "continue." That's the whole ritual.
2. It gives every agent a shared memory of your project.
Decisions, constraints, and preferences get captured once and are available to all of them. Ask any agent "why did we drop the queue?" and the answer is already in context, because a different agent recorded it three weeks ago.
The part I care about most: creating a handoff never calls a model. It's file parsing and file writing. It costs zero tokens, which is exactly what you need, because the moment you most want to switch agents is the moment you have no tokens left to spend on switching.
Why this matters if you're optimizing for cost
Here's the thing nobody says out loud: your quotas don't run out at the same time.
Claude's window resets on its own clock. Codex is tied to your ChatGPT plan. Cursor and Antigravity have their own free tiers. They are four independent budgets, and most developers burn one to zero and then just... stop for the day, because moving to another agent has felt more expensive than waiting.
Make the handoff free and the math flips completely. You stop treating "AI coding capacity" as one bucket you can empty, and start treating it as four buckets you rotate through.
Every one of those arrows is one command, and none of them costs a token. You're not sharing credentials or pooling accounts - each agent signs in the normal way, with its own login, under its own plan. mixai just makes moving between them cost nothing.
For a hobbyist on free tiers, that's the difference between a 90-minute coding session and an all-day one. For a team paying for seats, it's the difference between "wait for the reset" and "keep shipping."
What actually moves between agents
I want to be specific here, because "it transfers your context" is the kind of sentence that means nothing.
When you run mixai switch, it:
- Reads the source agent's own local session log - the real conversation, not a summary you had to write.
-
Snapshots the workspace - branch, HEAD,
git status, and a diff of your tracked changes. -
Writes a checkpoint to
.mixai/checkpoints/<id>/and mirrors it to.mixai/current/:-
BRIEF.md- a deliberately tiny file: current objective + git state -
HANDOFF.md- objective, last outcome, recent conversation, relevant memory -
TRANSCRIPT.md- the full extracted conversation, for when more detail is needed -
WORKSPACE.patch- your uncommitted changes as a diff
-
- Launches the target agent with a continuation prompt that says, in effect: read this checkpoint, inspect the live git state, and continue the unfinished objective - don't redo completed work.
Your repository stays the source of truth. The checkpoint is just a portable bundle that any agent can read, because it's plain Markdown and a patch file. If mixai vanished tomorrow, you could open HANDOFF.md yourself and paste it anywhere.
The memory half: agents that stop starting from scratch
Handoff solves the moment of switching. Memory solves everything after it.
Every checkpoint gets indexed into a local SQLite database and distilled into durable facts - decisions, constraints, preferences - plus a short summary. Then:
- Recent history stays verbatim. Older history folds into compact digests, and those digests fold into a project-level digest.
- Durable facts never expire. A constraint you set in month one is still there in month six, even after the raw conversation that produced it has been compressed away.
- Search works out of the box using SQLite's FTS5 full-text index with BM25 ranking. If you happen to have Ollama running locally, it layers in semantic search automatically. If you don't, it just works with keyword search.
mixai memory search "why did we pick Postgres over Mongo"
Any agent can ask that. Not just the one that was there.
Once you run mixai integrate in a project, this stops being something you have to remember to do. It wires into each agent's lifecycle hooks: relevant memory is injected per prompt, context is restored after a compaction or reset, and agents that speak MCP get direct tools (memory_search, memory_save, context_brief, list_handoff_targets, switch_to_provider) instead of shelling out.
That last pair matters more than it sounds: it means an agent that notices it's hitting a limit can check which other agents are ready and offer to hand off - and only after you say yes.
Smaller prompts, and honest numbers
Context windows are the other place tokens quietly evaporate. mixai is fairly aggressive about staying small:
- Memory search returns previews, not full records. You drill into the full text only when you actually want it.
- Older summaries are rolled up into digests instead of accumulating forever.
- Everything injected into a prompt is hard-capped by a character budget.
- Two on-demand code-map tools -
code_outlineandcode_find_references- let an agent jump to the right lines instead of reading (and re-reading) whole files. Unlike an always-loaded "repo map," they add nothing to every message.
And then there's the part I'm oddly proud of: mixai refuses to make up savings numbers.
mixai memory savings
disclosure: 2 event(s), ~549 tokens (2197 chars)
Total: ~549 tokens (2197 chars) across 2 event(s).
This counts only exact, measured deltas mixai can prove from its own
compression - it does not estimate what re-exploring the repo without
mixai would cost.
Every number there is a real measured delta between what would have been sent and what was actually sent. There is no "saves you 80% of your tokens!" mechanism, because measuring that honestly would require knowing what a from-scratch agent would have spent re-exploring your repo - and mixai can't observe that. There's also mixai memory spend for a full per-agent, per-purpose cost breakdown.
Getting started (about two minutes)
# 1. install
npm install -g mixai-cli
# 2. see what you've actually got installed and signed in
mixai status
# 3. once per project: wire it into your agents
cd your-project
mixai integrate
Then use it:
# hand off when you hit a limit
mixai switch codex --from claude
mixai switch cursor --from codex
mixai switch claude --from cursor
# branch a separate conversation, leaving the original alone
mixai fork codex
# save a checkpoint without opening anything
mixai export
# route a one-off task to whichever agent is available
mixai run "Explain the architecture and flag the riskiest module"
mixai run --write "Add input validation and tests"
# ask your project's memory a question - costs nothing
mixai memory search "why did we drop the queue"
mixai brief
mixai brief is the one I reach for most often, honestly. After a context compaction, it reloads the objective, live git state, and the most relevant project memory - without the agent re-reading your repository to figure out where it was.
The honest caveats
- Node.js 22.5+ is required for the persistent-memory features (it uses Node's built-in SQLite).
-
macOS gets one-click desktop handoffs. On other platforms you use the agents' terminal CLIs via
--surface interactive. - For desktop handoffs, mixai prints a short instruction to paste into the app it just opened. It's a copy-paste, not magic.
- You need at least one supported agent installed and signed in: Claude Code, Codex, Cursor, or Antigravity.
-
npm install -gdoes not wire mixai into your projects.mixai integrateis a separate, per-project step - andmixai integrate --removecleanly undoes every change it made.
And what it deliberately is not: it's not a proxy, not a model router in front of an API, and not a place you put credentials. Each agent uses its own local login. Everything lives in .mixai/ inside your project, gitignored by default. Nothing is uploaded.
Try it
If you've ever stared at a "usage limit reached" message with two other perfectly good agents sitting idle on your machine, this is for you.
- 📦 npm:
npm install -g mixai-cli - 🐙 GitHub: github.com/thinhledev/mixai - MIT licensed, and a ⭐ genuinely helps
- 🐛 Issues and ideas: github.com/thinhledev/mixai/issues
I'd especially like to hear which agent combinations you rotate through, and where the handoff still loses something it shouldn't. That's the part I'm still tuning.
What's your current workaround when an agent hits its limit mid-task? I'm genuinely curious - drop it in the comments.





Top comments (1)
This is the kind of engineering detail that usually matters more in production than the headline feature. Small boundaries compound when a workflow runs every day.