fix(credentials): address review feedback
- wakeContainer now never throws — returns Promise<boolean>, catches internally. Closes the regression risk for the 5 awaited callers in agent-to-agent, interactive, and approvals/response-handler that the previous version left unwrapped. Router uses the boolean to stop the typing indicator on transient failure; host-sweep just awaits. - Tighten AUTH_REQUIRED_RE: anchor to start-of-string with the specific `·` (U+00B7) separator the CLI uses, so an agent that quotes the banner mid-sentence in a normal reply doesn't trip the classifier. - Log a one-line note from writeAuthRequiredMessage so substitutions are visible when debugging "user got the credentials message but I don't see why." - Add unit tests for ClaudeProvider.isAuthRequired covering both banner variants, trailing content, mid-sentence quoting, leading-prose quoting, alternate separators, and unrelated text. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -450,15 +450,11 @@ async function deliverToAgent(
|
||||
startTypingRefresh(session.id, session.agent_group_id, event.channelType, event.platformId, event.threadId);
|
||||
const freshSession = getSession(session.id);
|
||||
if (freshSession) {
|
||||
try {
|
||||
await wakeContainer(freshSession);
|
||||
} catch (err) {
|
||||
// Transient spawn failure (e.g. OneCLI gateway down). The inbound
|
||||
// row is already persisted — host-sweep will retry the wake on its
|
||||
// next tick. Don't bubble out of the channel adapter.
|
||||
log.warn('wakeContainer failed — host-sweep will retry', { sessionId: freshSession.id, err });
|
||||
stopTypingRefresh(freshSession.id);
|
||||
}
|
||||
const woke = await wakeContainer(freshSession);
|
||||
// wakeContainer never throws — it returns false on transient spawn
|
||||
// failure (host-sweep retries). Stop the typing indicator we just
|
||||
// started so it doesn't leak; the inbound row stays pending.
|
||||
if (!woke) stopTypingRefresh(freshSession.id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user