Primary finding
Main-agent OAuth fallback copies credentials without acquiring the auth store file lock
- src/agents/auth-profiles/oauth.ts:207-226
Everywhere else in oauth.ts the auth store is read and written under `withFileLock` (e.g. refreshOAuthTokenWithLock). This fallback path reads main store via ensureAuthProfileStore(undefined) and writes the secondary agent's store via saveAuthProfileStore without any lock. A concurrent refresh on the secondary agent could overwrite the just-written value, or vice versa, causing torn/lost credentials. This is a data-integrity hazard on the same file used by other code paths that do lock.
Recommendation
Perform the copy inside `withFileLock(authPath, AUTH_STORE_LOCK_OPTIONS, ...)` so the secondary agent's store update is atomic with respect to other writers.