One Agent Harness
Enables cross-agent context handoff with OpenAI Codex by extracting session context and artifacts from Codex sessions and injecting them into Codex, including native session resumption and $handoff support.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@One Agent Harnesshand off my latest Claude Code session to Codex and launch it"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
One Agent Harness (harness)
Universal Cross-Agent Context Bridge for Claude Code, Antigravity, OpenAI Codex, and Grok Build CLI.
Never re-explain your problem or manually copy-paste context when switching AI coding tools. One Agent Harness extracts your exact verbatim conversation turns, active implementation plans, task lists, modified files, terminal errors, and uncommitted git state from any agent and injects or hands them off to any other agent in one command.
Supported Platforms & Operating Systems
AI Coding Agent | Session & Artifact Storage | Native Session Injection | MCP & |
Claude Code |
| ✅ | ✅ |
Antigravity |
| ✅ | ✅ |
OpenAI Codex |
| ✅ | ✅ |
Grok Build CLI |
| ✅ | ✅ |
Works out of the box on Linux (X11, Wayland, WSL2, SSH/OSC 52), macOS, and Windows (PowerShell, CMD, Windows Terminal, Git Bash) with zero external runtime dependencies (100% Python 3.9+ standard library).
Related MCP server: passoff
Installation (Linux · macOS · Windows)
Option 1: One-Line Bootstrap Installer (Recommended)
Linux & macOS (bash / zsh / sh):
git clone https://github.com/ajmainapon/one-agent-harness.git
cd one-agent-harness
chmod +x install.sh && ./install.shWindows (PowerShell):
git clone https://github.com/ajmainapon/one-agent-harness.git
cd one-agent-harness
.\install.ps1Option 2: Standard Python Package (pipx, uv, or pip)
# Install globally with pipx or uv (Linux, macOS, Windows)
pipx install .
# or: uv tool install .
# or: pip install -e .
# Register MCP server + /handoff & $handoff skills across all 4 agents
harness install
# Start background Auto-Sync Watcher daemon
harness watch --daemonUsage Guide
1. Inside Any Agent Chat (/handoff & $handoff)
No need to remember session UUIDs! Pass a session number (1, 2, 3), project name, keyword, or agent name:
In Claude Code, Antigravity, or Grok Build CLI:
/handoff(loads the latest active session)/handoff my-project(fuzzy-matches your project or session title)/handoff 2(loads session#2from the recent sessions list)/handoff claude(loads your latest Claude Code session)
In OpenAI Codex (
v0.162.1+):$handoff,$handoff my-project, or$handoff 2(Codex reserves/for built-in TUI commands and uses$for skills).
2. Zero-Flag Terminal Shorthands
Run harness (with no arguments) to see the colorized dashboard with numbered sessions (#1, #2, #3, ...):
# View colorized dashboard of all recent sessions across all 4 platforms
harness
# Interactive menu — pick a session & action by number
harness pick
# 1-command switch into an agent (accepts session number, project keyword, or agent alias)
harness codex # Inject latest session into Codex & launch
harness codex 3 # Inject session #3 into Codex & launch
harness codex "auth refactor" # Inject session matching "auth refactor" into Codex & launch
harness claude 2 # Inject session #2 into Claude Code & launch
harness agy 1 # Inject session #1 into Antigravity
# Copy any session's full handoff bundle to system clipboard
harness copy # Copy #1 latest session
harness copy 2 # Copy session #2
harness copy "auth" # Copy session matching "auth"
# Search across all 4 platforms' transcripts & touched files
harness search "keyword"3. Environment Variable Overrides
All storage paths default to standard user home directories on Linux, macOS, and Windows (~ / %USERPROFILE%), and can be customized via environment variables:
Environment Variable | Default Path | Description |
|
| Claude Code data directory |
|
| Antigravity data directory |
|
| OpenAI Codex data directory |
|
| Grok Build CLI data directory |
|
| One Agent Harness state, logs, and checkpoints |
Running the Test Suite
python3 -m unittest discover -s tests -vLicense
MIT License — see LICENSE.
Available Tools
5 toolsinject_session_to_agentB
Convert and inject the latest context bundle directly into a target agent's native session store ('claude', 'codex', 'antigravity', or 'grok') so it can be resumed natively.
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Optional workspace directory. | |
| to_agent | Yes | Target agent ('claude', 'codex', 'antigravity', 'grok'). | |
| from_agent | No | Optional source agent. | |
| session_id | No | Optional source session ID. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses that the operation writes into a destination session store and that formats are converted, but it says nothing about whether an existing session there is overwritten, what permissions/auth are needed, or whether the injection is reversible. For a write-style tool with zero annotation coverage, this is a significant gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single sentence with the action verb front-loaded and no filler; the parenthetical agent list is compact. It earns nearly all of its length, though the long clause structure is slightly dense.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no annotations and no output schema, the description must stand alone. It conveys the core action and destination set, and 'latest context bundle' implicitly justifies the optional source parameters, but it omits side effects, overwrite behavior, and prerequisites — leaving real gaps for a mutating tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, with all four parameters documented in the schema, and the description's parenthetical agent list merely repeats the to_agent enum. It adds no syntax, defaulting, or format detail beyond what the schema already supplies, so the baseline 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description names a specific compound verb (convert and inject) and a precise resource (the latest context bundle into a target agent's native session store), and it enumerates the valid destination agents. It does not explicitly name or contrast a sibling (e.g., pull_handoff_context), so it stops short of a 5.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The trailing clause 'so it can be resumed natively' implies the situation in which to reach for this tool, but there is no explicit when-to-use statement, no exclusion, and no named alternative among the handoff/session siblings. Usage is inferable but not guided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_recent_sessionsB
List recent coding sessions across Claude Code, Antigravity, Codex, and Grok Build CLI with session IDs, titles, working directories, turn counts, and timestamps.
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Optional workspace directory filter. | |
| agent | No | Optional filter by platform ('claude', 'antigravity', 'codex', 'grok'). | |
| limit | No | Maximum sessions to return (default: 15). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must carry the behavioral burden; it does disclose the return fields (session IDs, titles, working directories, turn counts, timestamps), which is genuine content. It never states that this is a read-only, non-mutating operation, nor anything about pagination or the semantics of 'recent'.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single front-loaded sentence with zero filler. Because there is no output schema, the enumeration of returned fields is load-bearing rather than redundant, and nothing could be cut without losing signal.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple, zero-required-parameter list tool with no output schema, the description covers platforms and return fields adequately. The remaining gaps are the undefined 'recent' window and any pagination/ordering behavior, which an agent would want before relying on the result set.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so all three parameters (cwd, agent, limit) are already documented in the schema. The description only obliquely echoes them via 'working directories' and the platform list; it adds no syntax, default, or format detail beyond what the schema provides, so the baseline 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb (List) and resource (recent coding sessions) and enumerates the four platforms covered plus the fields returned, so the agent knows exactly what comes back. It does not, however, name or contrast itself with the sibling search_cross_agent_history, which is the tool most likely to be confused with a listing call.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no when-to-use guidance, no exclusions, and no mention of when to prefer search_cross_agent_history or pull_handoff_context instead. The word 'recent' is the only scoping cue and is never defined (window, sort order, or relationship to the limit default of 15).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
pull_handoff_contextA
Pull the exact context (verbatim recent conversation turns, implementation plans, task checklists, modified/read files, terminal commands/errors, and git state) from the user's previous session in Claude Code, Antigravity, Codex, or Grok Build CLI. Also returns a snapshot of the latest active sessions across all other platforms. Call this whenever the user says '/handoff', '$handoff', 'continue from my last session', or switches from another agent.
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Optional workspace path to match sessions for the current project. | |
| query | No | Optional topic, project name (e.g. 'auth refactor', 'api-server', 'frontend'), session number ('1', '2'), or agent name ('claude', 'codex') to match. | |
| max_turns | No | Number of verbatim turns to include (default: 25). | |
| session_id | No | Optional specific session ID prefix, index number ('1', '2'), or fuzzy query to pull. | |
| source_agent | No | Optional source platform ('claude', 'antigravity', 'codex', 'grok'). Omit to auto-detect the most recently active session. | |
| exclude_agent | No | Optional current agent name to exclude when auto-detecting the previous agent. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations and no output schema, the description carries the full disclosure burden, and it does most of that work: it details the returned content (verbatim turns, plans, checklists, file lists, terminal errors, git state) and the extra cross-platform snapshot. It does not state the operation is read-only/non-mutating, nor mention any size, rate, or truncation limits beyond the max_turns parameter, leaving a modest gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, front-loaded with the core action, and the long parenthetical enumeration of returned artifacts is information-dense rather than padding. It is slightly heavy in one sentence, but every element earns its place by telling the agent what it gets back.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a read tool with no annotations and no output schema, the description supplies the return-content inventory an agent needs to decide whether calling it is worthwhile, plus trigger phrases. Remaining gaps — read-only guarantee, truncation/limits behavior, and how the cross-platform snapshot relates to the primary result — are minor but real.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so all six parameters are already documented in the schema with examples and defaults. The description adds no parameter-level syntax, format, or interaction guidance beyond what the schema provides, so the baseline 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific verb+resource ('Pull the exact context ... from the user's previous session') and enumerates exactly what that context contains: verbatim turns, plans, checklists, files, commands/errors, git state. It also names the supported source platforms and a secondary behavior (cross-platform session snapshot), which distinguishes it from list_recent_sessions and search_cross_agent_history.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It gives concrete invocation triggers — literal strings like '/handoff', '$handoff', 'continue from my last session', and the agent-switch scenario. That is strong when-to-use guidance. It stops short of naming sibling tools as alternatives or stating when NOT to use it (e.g., versus search_cross_agent_history), so it's clear but not fully routing.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
save_checkpoint_noteA
Save an explicit checkpoint summary and next steps so the next agent you open receives it at the top of its handoff context.
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Workspace directory path. | |
| summary | Yes | Summary of what was accomplished, architectural decisions, and current state. | |
| next_steps | No | Immediate next steps or open blockers for the next agent. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full behavioral burden. It does disclose the downstream effect (the note surfaces at the top of the next agent's handoff context), which is genuinely useful, but says nothing about persistence scope, whether repeated saves overwrite, or any permission requirements for a write operation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single sentence that front-loads the action and closes with the payoff for the next agent. No filler, no restatement of the title.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple 3-parameter tool with full schema coverage and no output schema, the description covers what it does and why it matters. The remaining gaps – overwrite/repeat-save semantics and whether cwd is required to target a workspace – are modest but real for a write tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents cwd, summary, and next_steps in detail; baseline is 3. The description names 'summary and next steps' but adds no new meaning beyond the schema and says nothing about the cwd parameter's role in scoping the checkpoint.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Specific verb+resource ('Save an explicit checkpoint summary and next steps') plus the observable effect on the next agent's handoff context. It implicitly contrasts with the read-side sibling pull_handoff_context, but never names it or the other siblings, so differentiation is left to the agent.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied by 'so the next agent you open receives it' – i.e. call this before handing off – but there is no explicit when-to-use, when-not-to-use, or statement of alternatives such as inject_session_to_agent or pull_handoff_context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_cross_agent_historyA
Search across all 4 agents' conversation transcripts, plans, and modified file paths for a keyword, error message, or filename.
| Name | Required | Description | Default |
|---|---|---|---|
| agent | No | Optional agent filter. | |
| limit | No | Maximum matches to return (default: 10). | |
| query | Yes | Keyword, filename, or phrase to search across all agents. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It usefully discloses the breadth of data searched (four agents plus transcripts, plans, and file paths), which is genuine behavioral context, but it omits match semantics (substring vs. semantic), case sensitivity, result shape, and whether every agent is always indexed.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
One sentence, front-loaded with the verb and scope, with zero filler. Every clause earns its place by specifying what is searched and where.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple read-only search with no output schema and no annotations, the definition covers scope and inputs adequately but says nothing about what a result contains or how matches are grouped or ranked. An agent could call it correctly, but the return behavior is left entirely unspecified.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so all three parameters are already documented in the schema; baseline 3 applies. The description's restatement of acceptable query values (keyword, error message, filename) mildly reinforces the query parameter but adds no syntax or format detail beyond it.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb (Search), a clear scope (across all 4 agents), and the exact content types searched (conversation transcripts, plans, modified file paths). It is easily distinguished from siblings like save_checkpoint_note or inject_session_to_agent, which perform entirely different operations.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use it by naming the search inputs (keyword, error message, filename), which conveys a retrieval scenario. However, it names no alternative tool and gives no explicit when-not-to-use conditions, leaving routing to inference.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
5 tool updates
v0.2.0- First observed
inject_session_to_agent - First observed
list_recent_sessions - First observed
pull_handoff_context - First observed
save_checkpoint_note - First observed
search_cross_agent_history
TDQS
Scored across 5 tools
Each tool targets a distinct action: pull context, list sessions, search history, save checkpoint, and inject into an agent. There is minor overlap between pull_handoff_context (which also returns an active session snapshot) and list_recent_sessions, but the descriptions clarify their primary purposes.
All tools follow a consistent snake_case, verb-first convention (pull_, list_, search_, save_, inject_). The prepositional suffix in inject_session_to_agent is a slight variation but remains readable and predictable.
Five tools is well-scoped for a cross-agent handoff harness, with each tool covering a necessary operation (pull, list, search, save, inject). There is no redundancy or obvious missing tool at this scale.
The toolset covers the core lifecycle: reading context (pull, list, search) and writing/injecting (save checkpoint, inject). Minor gaps exist, such as updating or deleting saved checkpoint notes, but agents can work around these.
Maintenance
Related MCP Connectors
Shared memory for AI tools: save once, recall word for word from Claude, ChatGPT, Codex or Gemini.
Shared memory for AI coding agents. Save once, reuse from Cursor, Claude Code, Codex.
Source-checked CLI guides and model-aware planning for Claude Code, Codex, and Grok Build.
Persistent cross-session memory shared by Codex, Claude Code, ChatGPT, and other AI agents.
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceEnables AI coding assistants like Claude Code, Cursor, and Codex to share chat logs, terminal history, and session context with each other. Eliminates the need to re-explain context when switching between different AI coding tools.2MIT
- AlicenseNot gradedqualityDmaintenanceEnables handoff of context between AI coding agents like Claude Code, Cursor, Codex, and Windsurf with built-in provenance tracking.12,632 npmMIT
- AlicenseAqualityAmaintenanceLocal-first working-state checkpoints and portable handoff packets for AI coding agents. Continuation checkpoints recover Claude Code sessions after rate limits, crashes, and compaction; packets hand tasks across tools, repos, and machines — Markdown on disk, no cloud, no telemetry.2321 npm4MIT
- AlicenseBqualityAmaintenanceEnables AI coding agents to persist, share, and retrieve project context locally via plain-text files, with support for capturing, packing, searching, and importing transcripts without external services.4MIT