Releases: megamen32/agent-resume
Release list
agent-resume v0.1.8
Changelog
[0.1.8] - 2026-07-16
Release tag: v0.1.8
Changes
- Merge the main MCP line with the parallel development line.
- Preserve the intermediate delayed-resume and AgentHerder fixes.
- Match OpenCode resume markers across user and assistant text parts.
- Fix the missing
uuidimport used byjob_paths(). - Include the delayed Codex resume skill and
wait_job_statusregression test. - Keep local OpenCode fork references aligned with the canonical workspace path.
Validation environment
- OS: Linux x86_64
- Python: 3.10.12
- Node.js: 22.22.3
- npm: 10.9.8
- pytest: 8.4.2
- Git: 2.34.1
Validation commands
python3 -m py_compile agent_resume.py scripts/install-client-configs.py scripts/test-codex-paid-smoke.py tests/test_wait_job_status.py— passednode --check npm/agent-resume-mcp.js— passedpython3 -m pytest -q tests—1 passednpm pack --dry-run— passed; packageagent-resume-mcp@0.1.8git diff --check— passed
agent-resume v0.1.7 — built-in wait/resume watchers
agent-resume v0.1.7 — built-in wait/resume watchers
Adds built-in long-wait tools so agent-resume can replace Notify for wait/resume flows:
run_and_resume— run a command, wait for exit/timeout, then resume the same chat.attach_pid_and_resume— watch an existing PID, then resume.attach_query_and_resume— find a process by command substring, watch, then resume.wait_and_resume— wait a fixed duration, then resume.wait_job_status— inspect wait job state.
Codex captures the current thread id from MCP _meta.threadId before detaching. OpenCode uses cwd + marker. execute_resume=true by default; set execute_resume=false only for tests.
The installer now defaults to Codex + OpenCode. Claude remains supported as an explicit fallback, but is not installed by default because Claude can resume itself.
agent-resume v0.1.6 — skipped paid Codex smoke test
agent-resume v0.1.6 — skipped paid Codex smoke test
Added
scripts/test-codex-paid-smoke.pynpm run test:codex-paid
The test is skipped by default because it runs a paid Codex model call.
Enable explicitly:
AGENT_RESUME_RUN_PAID_CODEX=1 AGENT_RESUME_CODEX_MODEL=gpt-5.4-mini npm run test:codex-paidThe test asserts that Codex calls agent_resume.build_resume_command without cwd and without marker, and verifies:
session_id_source == "mcp_meta"marker == nullused_last == falsecommandis the full argv array beginning withcodex exec resume <thread_id>
Notes
used_last: false means the unsafe --last path was not used. command is the full argv list returned by agent-resume; earlier summaries may show only its prefix for readability.
agent-resume v0.1.5 — Codex meta and required marker fallback
agent-resume v0.1.5 — Codex _meta session id + marker-required fallback
Changed
- Codex no longer needs a marker:
agent-resumereads the session/thread id from MCP request_meta.threadId. - OpenCode and Claude use
cwd + marker; their MCP clients do not provide a documented session id to tool calls. - MCP
tools/listnow specializes thebuild_resume_commandschema byAGENT_RESUME_AGENT:codex: no marker required.opencode/claude:cwdandmarkerare required.- generic/no default agent: explicit
session_idorcwd + marker.
use_lastremains disabled.
Marker
For OpenCode/Claude, marker is a plain required tool argument:
[A-Za-z0-9]{5}
Example: Q7xK2.
agent-resume v0.1.4 — short marker matching
agent-resume v0.1.4 — short marker matching
Changed
- Replaced timestamp/UUID-first correlation with a simple
marker. - Accepted marker format: exactly 5 ASCII alphanumeric chars
[A-Za-z0-9]{5}. - The MCP server records
called_at_msitself, so the model does not need to know current time. use_lastis disabled for resume matching; it can wake the wrong chat.build_resume_commandnow requiresmarkerunless explicitsession_idis provided.- If no candidate has an exact marker match (
score >= 100), resume is refused.
Example
MARKER=Q7xK2
opencode run --title "agent-resume-$MARKER" "Do the task. Marker: $MARKER"
AGENT_RESUME_AGENT=opencode ./agent_resume.py resume --cwd "$PWD" --marker "$MARKER" --job-id job-123 --log-file /tmp/job.logagent-resume v0.1.3 — safe run_id matching
agent-resume v0.1.3 — safe run_id matching
New safety rule
build_resume_command now requires run_id unless session_id is explicit or use_last=true.
Accepted run_id formats:
- 13-digit epoch milliseconds, e.g.
1783217856841 - UUID4
If no candidate has an exact run_id match (score >= 100), agent-resume refuses to fall back to --last.
Why
This prevents waking the wrong chat when multiple sessions share the same cwd or similar title.
OpenCode note
Custom/local OpenCode builds can write to opencode-<channel>.db. Use:
export OPENCODE_DISABLE_CHANNEL_DB=trueto force the standard database ~/.local/share/opencode/opencode.db.
agent-resume v0.1.2 — client config installer
agent-resume v0.1.2 — client config installer
New
- Added
scripts/install-client-configs.py. - Installs ready-to-use MCP config entries for:
- Codex:
AGENT_RESUME_AGENT=codex - OpenCode:
AGENT_RESUME_AGENT=opencode - Claude Code:
AGENT_RESUME_AGENT=claude
- Codex:
- OpenCode JSONC is patched minimally to preserve existing formatting/comments/secrets.
Install examples
python3 scripts/install-client-configs.py codex opencode claudeCodex config entry:
[mcp_servers.agent_resume]
command = "npx"
args = ["-y", "github:megamen32/agent-resume"]
env = { "AGENT_RESUME_AGENT" = "codex" }
enabled = trueOpenCode config entry uses environment.AGENT_RESUME_AGENT = "opencode".
Claude Code config entry uses env.AGENT_RESUME_AGENT = "claude".
Validation on roomhacker-server-100
codex mcp list:agent_resumeenabled, env masked.opencode mcp list:agent-resumeconnected.claude mcp list:agent-resumeconnected.- Direct MCP handshakes with
AGENT_RESUME_AGENT=codex|opencode|claude: OK.
agent-resume v0.1.1 — configured agent identity
agent-resume v0.1.1
Fixes design issue
The model no longer needs to pass agent=codex|opencode|claude on every call.
Configure the MCP server once with:
AGENT_RESUME_AGENT=codex
AGENT_RESUME_AGENT=opencode
AGENT_RESUME_AGENT=claudeor use ~/.config/agent-resume/config.json:
{ "agent": "codex" }Better SESSION_ID detection
Codex now prefers the real state DB:
~/.codex/state_5.sqlite
table: threads
id -> SESSION_ID
cwd -> project match
rollout_path -> transcript file
Fallback remains ~/.codex/session_index.jsonl.
OpenCode still uses SQLite session tables from ~/.local/share/opencode/*.db.
Claude Code still scans ~/.claude/projects/<encoded-cwd>/*.jsonl.
Source review
README now documents the exact source findings from:
/home/roomhacker/src/codex/home/roomhacker/.config/opencode/apps/forks/opencode
agent-resume v0.1.0
agent-resume v0.1.0
Initial MVP.
What it does
- Finds likely local sessions for
agent=codex|opencode|claude. - Builds dry-run resume commands by default.
- Can launch resume commands detached with
execute=true. - Exposes MCP tools:
find_sessionsbuild_resume_commandregister_agent
Resume backends
- Codex:
codex exec resume <session|--last> "prompt" - OpenCode:
opencode --session <id> --prompt "prompt"or--continue - Claude Code:
claude --print --resume <id> "prompt"or--continue
Install
npx -y github:megamen32/agent-resumeThe tool is safe by default: it returns the command it would run unless execute=true is explicitly set.