[BUG] Race condition in plugin agent setting resolution
Resolved 💬 2 comments Opened Apr 14, 2026 by pqienso Closed May 24, 2026
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
There's a race condition in the Claude Code startup sequence: when a plugin provides an agent setting via its settings.json, the setting is silently dropped because the merged settings cache is primed before plugin loading completes.
What Should Happen?
Agent resolution should be deferred after plugin loading completes. This will then allow the agent: setting in the plugin's settings.json to be merged properly.
Error Messages/Logs
Steps to Reproduce
- Create a plugin which includes an agent. Create
settings.jsonwith{"agent": "[plugin_name]:[agent_name]"}at the plugin root. - Install plugin with local scope in a directory.
- Run
claudein that directory. - The agent fails to load as the main agent in the session.
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
2.1.87
Claude Code Version
2.1.105
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗