Fix agents.json race condition on concurrent starts
Re-read agents.json immediately before writing in startAgent to avoid one start overwriting another's entry. Also clean stale sockets before starting new agents. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -197,7 +197,7 @@ export async function runOverseer(config: OverseerConfig) {
|
||||
for (const name of knownAgents) {
|
||||
if (!currentNames.has(name)) {
|
||||
log(`Agent "${name}" died, cleaned up.`);
|
||||
bot.say("#agents", `Agent "${name}" has died and been cleaned up.`);
|
||||
bot.say(config.channel, `Agent "${name}" has died and been cleaned up.`);
|
||||
}
|
||||
}
|
||||
knownAgents = currentNames;
|
||||
|
||||
Reference in New Issue
Block a user