Skip to main content

cc-mid-session-registry-staleness

Fix for two Claude Code mid-session staleness traps that fail Workflow runs instantly (<15ms). Use when: (1) a Workflow agent() call fails with "agent type '<name>' not found" listing only plugin/built-in agents, even though .claude/agents/<name>.md exists with valid frontmatter — the agent registry only loads .claude/agents/ at session START, so agent files created mid-session are not resolvable via agentType/subagent_type until restart; (2) re-invoking a saved workflow via Workflow({name}) runs STALE code after you edited .claude/workflows/<name>.js — name resolution serves a cached snapshot, so mid-session edits never reach it. Both failures look like your code is wrong when it's actually registry caching. Fixes: launch via Workflow({scriptPath: <live file path>}) to bypass the name cache, and design workflow scripts with a registry-independent persona fallback (prompt the agent to Read its own .claude/agents/<name>.md and adopt the role) toggled by an arg like useAgentTypes:false.

Jump to install

Source facts

Repository
cajias/claude-skills
Last source activity
July 20, 2026 at 07:29
Detected SKILL.md language
English
Stars
0
Forks
0

Install options

The review-first prompt is selected by default. You can switch to a direct command or download a local copy.

Review the source files

Read SKILL.md and any companion files shown by SkillsMP before deciding whether to install.