The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(desktop): room-level group failures carry their reason too
teknium15a41d1bc7ce1
diff --git a/apps/desktop/src/plugins/hermes-bots/group-activity.test.ts b/apps/desktop/src/plugins/hermes-bots/group-activity.test.tsindex 647eb93af72..ce3670ce758 100644--- a/apps/desktop/src/plugins/hermes-bots/group-activity.test.ts+++ b/apps/desktop/src/plugins/hermes-bots/group-activity.test.ts@@ -178,6 +178,31 @@ describe('turn arc', () => {expect(failed?.reason).toBeUndefined()expect(Object.values(room.data.$botAttention.get())[0]?.reason).toBe('missing_config')})++ // #116458: a member whose backend never got a pool slot is healthy; the+ // room must not describe pool starvation as a bot crash (and never badge it).+ it('a slot-wait timeout reads as could-not-start, not as a bot error', async () => {+ const room = await loadRoom({+ turn: ({ profile }) => {+ if (profile === 'builder') {+ throw new Error(+ "Error invoking remote method 'hermes:api': Local backend start for \"builder\" timed out while waiting for a free slot."+ )+ }++ return '(pass)'+ }+ })++ room.rounds.sendToGroupChat('Slot wait', MEMBERS, 'anyone around?')+ await drain(() => Boolean(room.chat.$groupChats.get()['Slot wait']?.running))++ const failed = feed(room, 'Slot wait').find(event => event.kind === 'failed' && event.member === 'builder')++ expect(failed?.reason).toBe(room.activity.GROUP_SLOT_WAIT_REASON)+ expect(room.activity.groupActivityLabel(failed!, 'Slot wait')).toBe("builder couldn't start — too many bots running")+ expect(room.data.$botAttention.get()).toEqual({})+ })})describe('epoch scoping', () => {diff --git a/apps/desktop/src/plugins/hermes-bots/group-rounds.ts b/apps/desktop/src/plugins/hermes-bots/group-rounds.tsindex 3ca2d281624..c2b7db9a80b 100644--- a/apps/desktop/src/plugins/hermes-bots/group-rounds.ts+++ b/apps/desktop/src/plugins/hermes-bots/group-rounds.ts@@ -6,7 +6,7 @@import { host } from '@hermes/plugin-sdk'import { botFriendlyNames, botHandle, botMentionTag, mentionNameForms } from './data'-import { recordGroupActivity } from './group-activity'+import { groupFailureReason, recordGroupActivity } from './group-activity'import {$groupChats,$groupNeedsYou,@@ -890,9 +890,10 @@ function queueGroupChatDrive(group: string, members: GroupMember[], thread: striupdateGroupChat(group, room => ({ ...room, running: true }))await runGroupChatRounds(group, nextMembers, nextThread, drive.failedMembers)}- } catch {+ } catch (error) {if (binding.isLive()) {- recordGroupActivity(group, { kind: 'failed', member: null, thread: currentThread })+ const reason = groupFailureReason(error)+ recordGroupActivity(group, { kind: 'failed', member: null, thread: currentThread, ...(reason ? { reason } : {}) })updateGroupChat(group, room => ({ ...room, running: false, turn: null }))}} finally {