7b649eb77f3a8dfea92e13c9f96ca40612b76c95
Prevents server crashes when invalid modes are passed to agents by validating mode IDs before attempting to set them on the SDK. - Export VALID_CLAUDE_MODES and VALID_CODEX_MODES from provider files - Add validateMode() function in agent-manager.ts - Apply validation in createAgent(), resumeAgent(), and setAgentMode() - Throws clear error listing valid modes when validation fails This fixes the crash when 'read-only' (Codex mode) was passed to a Claude agent. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Languages
TypeScript
98%
JavaScript
1.4%
Shell
0.1%