agent_unarchive — Claude Code subagent: what it does, how to install
The agent_unarchive Claude Code subagent returns an archived coding-agent session to the Agents list. It also asks the agent’s own tool to restore the session where it was archived.
MIT ★ 395 updated 2026-11-16
.claude/agents/agent_unarchive.mdWhat agent_unarchive does
The subagent puts an archived session back in the Agents list. It needs the machine name or ID shown by agents_list, plus the session ID; the first 8 characters of that ID can be used instead.
Restoring the list entry does not restart a stopped agent. Resume it separately with agent_send and the resume parameter. Persona also calls the agent’s own tool to restore the session there and reports whether that worked.
What it helps with
- return an archived session to the Agents list
- locate a session using its machine and session IDs
- restore a session in the tool that archived it
- distinguish restoring a session from restarting a stopped agent
Example prompts for the agent
- Return session
a1b2c3d4e5on machinebuild-01to the Agents list. - Restore archived session
a1b2c3d4on machinedevbox. - Add agent session
a1b2c3d4frombuild-01back to Agents.
How to install agent_unarchive
Manually: put the files in place
.claude/agents/agent_unarchive.mdFor all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention
Manually: put the files in place
.codex/agents/agent_unarchive.tomlCodex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/
Manually: put the files in place
.cursor/agents/agent_unarchive.mdCursor also reads .claude/agents/
Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean
Questions about agent_unarchive
How do I install agent_unarchive in Claude Code?
Add the subagent file to the project at .claude/agents/agent_unarchive.md.
What does agent_unarchive do?
It returns an archived coding-agent session to the Agents list and asks the agent’s own tool to restore it where it was archived. This does not resume a stopped agent.
What information does agent_unarchive need to find a session?
It needs the machine name or ID shown by agents_list and the session ID. The first 8 characters of the session ID are accepted.
Source text
agent_unarchive.md · MIT
Bring an archived coding agent's session back into the Agents list (find it with agents_list and state archived). Nothing is reopened on the computer: a stopped agent stays stopped until resumed (agent_send with resume). Persona also asks the agent's own tool to restore it where that tool archived it too; the result says whether it did.
```json
{
"type": "object",
"required": ["machine", "session_id"],
"properties": {
"machine": {
"type": "string",
"description": "the machine's id or name, as agents_list shows it"
},
"session_id": {
"type": "string",
"description": "the agent's session id, or its first 8 characters"
}
}
}
```
© nwverse · MIT · nwverse/persona