Skip to content

an open-source alternative to the dots, bots and muses of the world, run an office of claude code/codex like agents on your laptop, sandboxes or anywhere, uses your existing subscriptions

Address Codex provider review findings

Piotr Durlej8eb1c4b3a8ab
diff --git a/src/main/hive.ts b/src/main/hive.ts
index ae3be782..8790b20f 100644
--- a/src/main/hive.ts
+++ b/src/main/hive.ts
@@ -536,12 +536,20 @@ export class HiveManager {
const resolveTo = (to: string): string => (to === 'human' || to === 'god' ? godId : to);
const targets = msg.to === 'broadcast'
// The roster for fan-out is the ACTIVE registry: skip the send-only prep
- // assistant and any archived agent (closed tab) so mail never piles into a
- // dead inbox no one will read.
- ? Object.keys(reg.agents).filter((a) => a !== msg.from && !reg.agents[a]?.isAssistant && !reg.agents[a]?.archived)
+ // assistant, non-Claude providers without hook/protocol support, and any
+ // archived agent (closed tab) so mail never piles into a dead inbox no one
+ // will read.
+ ? Object.keys(reg.agents).filter((a) => {
+ const agent = reg.agents[a];
+ return a !== msg.from
+ && !agent?.isAssistant
+ && !agent?.archived
+ && isClaudeProvider(agent?.provider ?? 'claude');
+ })
// Never deliver to self — guards a god → "human" message looping back to god.
: [resolveTo(msg.to)].filter((t) => t !== msg.from);
for (const t of targets) {
+ const target = reg.agents[t];
// Enforce the assistant's send-only contract AT THE ROUTER: it has no
// composer, is excluded from the inbox-wake nudge, and never reads an
// inbox — yet direct mail used to be delivered there anyway, where it
@@ -549,7 +557,7 @@ export class HiveManager {
// reprimand about the unread inbox, both unread for hours). Bounce such
// mail to god instead, so the sender's intent surfaces immediately and
// nothing is silently lost.
- if (reg.agents[t]?.isAssistant) {
+ if (target?.isAssistant) {
this.deliver({
...msg,
to: godId,
@@ -557,6 +565,14 @@ export class HiveManager {
}, godId);
continue;
}
+ if (target && !isClaudeProvider(target.provider ?? 'claude')) {
+ this.deliver({
+ ...msg,
+ to: godId,
+ subject: `[bounced — "${t}" uses ${target.provider ?? 'custom'}; route via its terminal, not hive inbox] ${msg.subject}`
+ }, godId);
+ continue;
+ }
this.deliver(msg, t);
}
this.appendLog({ kind: 'message', from: msg.from, to: msg.to, act: msg.act, subject: msg.subject, id: msg.id });
diff --git a/src/renderer/src/components/AddAgentModal.tsx b/src/renderer/src/components/AddAgentModal.tsx
index a5e54ac6..5fc38dea 100644
--- a/src/renderer/src/components/AddAgentModal.tsx
+++ b/src/renderer/src/components/AddAgentModal.tsx
@@ -254,7 +254,7 @@ export function AddAgentModal({ onClose, config }: AddAgentModalProps) {
</div>
</Row>}
- <Row label={config.autoMode ? 'Command (auto mode on)' : 'Command'}>
+ <Row label={config.autoMode && isClaudeProvider(provider) ? 'Command (auto mode on)' : 'Command'}>
<input
value={command}
onChange={(e) => setCommand(e.target.value)}
diff --git a/src/renderer/src/hooks/useHive.ts b/src/renderer/src/hooks/useHive.ts
index 0e10ebcc..49f3b582 100644
--- a/src/renderer/src/hooks/useHive.ts
+++ b/src/renderer/src/hooks/useHive.ts
@@ -1,6 +1,12 @@
import { useEffect, useRef } from 'react';
import { useStore, type Agent, type StationKind, type ToolKind } from '@/store/store';
-import { buildSpawnCommand, ASSISTANT_MODEL, type HarnessConfig } from '@/store/config';
+import {
+ buildSpawnCommand,
+ ASSISTANT_MODEL,
+ inferAgentProvider,
+ isClaudeProvider,
+ type HarnessConfig
+} from '@/store/config';
const GOD_ID = 'god';
const GOD_PTY = `pty-${GOD_ID}`;
@@ -521,6 +527,7 @@ export function useHive(config: HarnessConfig | null): void {
const { agents, messageQueues, enqueueMessage } = useStore.getState();
for (const a of agents) {
if (!a.ptyId) continue;
+ if (!isClaudeProvider(inferAgentProvider(a.command, a.provider))) continue;
const queued = messageQueues[a.id] ?? [];
if (queued.some((m) => m.text.trimStart().startsWith('/compact'))) continue;
enqueueMessage(a.id, COMPACT_CMD);
diff --git a/src/shared/agentProvider.ts b/src/shared/agentProvider.ts
index 34187e13..8b94c420 100644
--- a/src/shared/agentProvider.ts
+++ b/src/shared/agentProvider.ts
@@ -4,13 +4,12 @@ export interface AgentProviderPreset {
id: AgentProvider;
label: string;
defaultCommand: string;
- supportsModels: boolean;
}
export const AGENT_PROVIDER_PRESETS: AgentProviderPreset[] = [
- { id: 'claude', label: 'Claude Code', defaultCommand: 'claude', supportsModels: true },
- { id: 'codex', label: 'Codex', defaultCommand: 'codex', supportsModels: false },
- { id: 'custom', label: 'Custom', defaultCommand: '', supportsModels: false }
+ { id: 'claude', label: 'Claude Code', defaultCommand: 'claude' },
+ { id: 'codex', label: 'Codex', defaultCommand: 'codex' },
+ { id: 'custom', label: 'Custom', defaultCommand: '' }
];
export function isAgentProvider(value: unknown): value is AgentProvider {