OmniscioGuidesSession agent no longer available
Session agent no longer available
This warning protects you from a silent change. Without it, a session that was built around an agent's tool restrictions would quietly continue with all the default tools.
Last checked against Anthropic's documentation on November 26, 2026. By the Omniscio team. Updated .
What is the exact message?
It names the agent and a directory Claude Code searched:
This session was running agent 'code-reviewer', which is no longer available (no agent by that name in /home/you/project). Continuing with the default tools and system prompt — the agent's tool restrictions no longer apply. To restore it, re-create the agent, or resume with an explicit --agent <name>.The last sentence tells you the two ways out, and the middle one tells you what changed: the agent's tool restrictions are gone.
The warning appears in the resumed conversation whether you wake a background session, run /resume or claude --resume, or resume in non-interactive mode, where it also goes to stderr. Sessions using --input-format stream-json do not show it, because the Agent SDK supplies agents after startup.
What does it mean?
You resumed a session whose main agent was a custom one, set at launch with --agent or through the agent setting, and Claude Code no longer finds an agent by that name.
Anthropic states the search order: the session's original directory first, when you have trusted that workspace, then the directory you resume from. If you never trusted the original workspace, that first directory is skipped, so a project agent that lived only in the original checkout is not found when you resume from somewhere else.
The session still resumes, but with the default tools and system prompt. That is the part worth reading twice: the agent's tool restrictions no longer apply. Equally, anything the agent equipped, such as extra tools or MCP servers, is gone with it.
Before v2.1.216, the fallback was silent and the lookup covered only the directory you resumed from, so a project-scoped agent could be lost on any resume from another directory.
Which case am I in?
- You resumed from a different directory. The agent was project-scoped and lived in the original checkout. Resume from that directory, or recreate the agent in the directory you are resuming from.
- The original workspace was not trusted. Claude Code only searches the session's original directory when you have trusted that workspace. Run Claude Code there once and accept the trust dialog, then resume again.
- The agent file was renamed or deleted. Recreate it under the name the message quotes, or resume with an agent that exists.
The built-in claude agent never triggers this warning, because falling back to the default toolset changes nothing for it. If the name in your message is claude, something else is going on.
Do not confuse this with --agent '<name>' not found. That is a launch failure for a background session whose --agent name matches no subagent; this warning is a session that already ran, resuming without its agent.
How do I fix it?
Recreate the agent file
Put the agent definition where the session can find it, under the name the message quotes. The reliable place is the root of the directory you are resuming from, which Claude Code searches; make the folder if it is missing:
.claude/agents/code-reviewer.mdA copy in the session's trusted original checkout is also found. For a personal agent available in every project:
~/.claude/agents/code-reviewer.mdThen resume the session again. If the agent is project-scoped and you have not trusted the session's original directory, run Claude Code there once and accept the trust dialog first, because Claude Code only searches that directory when the workspace is trusted.
Or resume as an agent that exists
Name an agent that does exist, and the session runs as that one instead:
claude --resume --agent <name>--agent makes the named agent the session's own main agent, the identity the session runs as, not a helper it delegates work to. Project agents live in .claude/agents/ and apply to that project; personal agents live in ~/.claude/agents/ and apply to all your projects.
Then check the warning is gone
Resume once more. If the agent is found, the warning does not appear at all. If it appears again, the lookup is still failing: the file is not in a directory Claude Code searches.
What does not help
- Resuming again without recreating the agent. Claude Code does not save the fallback, so each resume repeats the same lookup and the same warning.
- Expecting the agent's restrictions to be restored from the transcript. The agent definition is a file on disk; the transcript does not carry it back.
- Looking for the warning on
stream-jsoninput. Sessions using--input-format stream-jsondo not show it, because the Agent SDK supplies agents after startup.
How do I know it is fixed?
- Resuming no longer prints
is no longer available. - The session runs with the agent's tools and system prompt rather than the default toolset.
- If you resumed with
--agent, the named agent is the one the session runs as.
Where these answers come from
- Anthropic's error reference, Session agent no longer available, read November 26, 2026: the message, the cause, the search order, the default-tools fallback, where the warning appears, the repeat, the built-in agent exception, the fix, and the version history.
- Anthropic's subagents page, Choose the subagent scope, read November 26, 2026: the
.claude/agents/and~/.claude/agents/locations and their scopes. - Anthropic's agent view, From your shell, read November 26, 2026: the different
--agent '<name>' not foundlaunch failure for a background session.
Common questions
What does session agent no longer available mean?
You resumed a session that was running a custom agent, started with --agent or the agent setting, and Claude Code found no agent by that name in the directories it searches. The session resumes, but with the default tools and system prompt.
Does the warning change what the session can do?
Yes. The agent's tool restrictions no longer apply, because the session continues with the default tools. If the agent existed to limit or equip the session, recreate it before doing work that relied on that.
Where should I recreate the agent file?
Put it at .claude/agents/<name>.md in the directory you are resuming from, which Claude Code searches; a copy in the trusted original checkout is also found. For a personal agent available in every project, put it at ~/.claude/agents/<name>.md. Then resume again.
Why does the warning come back every time I resume?
Claude Code does not save the fallback to the session, so each resume repeats the warning until you recreate the agent or resume with an explicit --agent naming an agent that exists.