Context
pickFirstExistingAgentId() (routing/resolve-route.ts:146–161) silently rewrites unknown agent IDs to the default agent. A typo in a binding config routes messages to the wrong agent forever with zero trace. This is the worst bug-hiding behavior in the default-agent concept.
Depends on #1575 (sole-agent auto-selection must exist first).
What
- Rewrite
pickFirstExistingAgentId() to return null or throw when agent ID not found in config
- Change
resolveAgentRoute() final fallback (line 718) to return an error route
- Single-agent config + no binding match → auto-route to sole agent (convenience preserved)
- Multi-agent config + no binding match → explicit error with config guidance
Acceptance Criteria
Files
src/routing/resolve-route.ts
src/routing/bindings.ts (if applicable)
src/routing/resolve-route.test.ts
Context
pickFirstExistingAgentId()(routing/resolve-route.ts:146–161) silently rewrites unknown agent IDs to the default agent. A typo in a binding config routes messages to the wrong agent forever with zero trace. This is the worst bug-hiding behavior in the default-agent concept.Depends on #1575 (sole-agent auto-selection must exist first).
What
pickFirstExistingAgentId()to return null or throw when agent ID not found in configresolveAgentRoute()final fallback (line 718) to return an error routeAcceptance Criteria
resolveAgentRoute()final fallback returns error route with log guidanceFiles
src/routing/resolve-route.tssrc/routing/bindings.ts(if applicable)src/routing/resolve-route.test.ts