fix(start-work): gracefully handle missing Atlas agent (fixes #2132)

This commit is contained in:
MoerAI
2026-03-27 21:13:44 +09:00
parent 324dbb119c
commit d09af86ea7
3 changed files with 24 additions and 4 deletions
@@ -11,12 +11,23 @@ export function getMainSessionID(): string | undefined {
return _mainSessionID
}
const registeredAgentNames = new Set<string>()
export function registerAgentName(name: string): void {
registeredAgentNames.add(name.toLowerCase())
}
export function isAgentRegistered(name: string): boolean {
return registeredAgentNames.has(name.toLowerCase())
}
/** @internal For testing only */
export function _resetForTesting(): void {
_mainSessionID = undefined
subagentSessions.clear()
syncSubagentSessions.clear()
sessionAgentMap.clear()
registeredAgentNames.clear()
}
const sessionAgentMap = new Map<string, string>()