feat: auto-recreate reviewer containers on token rotation
When OAuth tokens rotate or refresh, all reviewer containers are automatically removed. The next reviewer turn recreates them with the latest token, preventing 401 auth failures. Uses callback pattern to avoid circular dependencies: - token-rotation.ts: onTokenRotated(cb) - token-refresh.ts: onTokenRefreshed(cb) - index.ts: registers recreateAllReviewerContainers as callback
This commit is contained in:
@@ -442,8 +442,7 @@ export function createMessageRuntime(deps: MessageRuntimeDeps): {
|
||||
if (isReviewerHandoff) {
|
||||
const revChName =
|
||||
REVIEWER_AGENT_TYPE === 'claude-code' ? 'discord' : 'discord-review';
|
||||
handoffChannel =
|
||||
findChannelByName(deps.channels, revChName) || channel;
|
||||
handoffChannel = findChannelByName(deps.channels, revChName) || channel;
|
||||
}
|
||||
|
||||
const runId = `handoff-${handoff.id}`;
|
||||
|
||||
Reference in New Issue
Block a user