Opus finding
Compatibility comment claims oauth/token mismatch is allowed but condition rejects all other mismatches silently
lowmaintainabilityhigh
- src/agents/auth-profiles/oauth.ts:138-146
The comment is accurate but narrow. The negative condition returns null for all other mode/type mismatches, including legitimate ones like config=`token` and cred=`oauth` or vice versa for new providers. Returning null silently without logging makes provider migrations hard to diagnose. Recommend logging the mismatch.
Recommendation
Add a debug log when rejecting due to mode/type mismatch so misconfigurations are diagnosable.