Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(conversations): restore missing external store provider

Steven Enamakel53bcfb5d319f
diff --git a/app/src/features/conversations/Conversations.tsx b/app/src/features/conversations/Conversations.tsx
index 89cef98c71..1007dd16a6 100644
--- a/app/src/features/conversations/Conversations.tsx
+++ b/app/src/features/conversations/Conversations.tsx
@@ -1476,16 +1476,16 @@ const Conversations = ({
() => selectBackgroundProcesses(selectedThreadToolTimeline),
[selectedThreadToolTimeline]
);
- // Harness work state the agent keeps for this thread — its todo list and
- // the thread goal — read off the newest `todo` / `goal_*` tool results
- // across this turn and the thread's settled turns
- // (`hooks/useThreadHarnessState.ts`). Rendered above the composer next to
- // the gate cards so a five-step task shows as a checklist ticking off while
- // the agent works through it.
- const { todoList, goal: threadGoal } = useThreadHarnessState(
- selectedThreadId ?? null,
- selectedThreadToolTimeline
- );
+ // Harness work state the agent keeps for this thread — its live todo list
+ // and its goal — driven by the dedicated `thread_todos_changed` /
+ // `thread_goal_updated` core events (`aui/useThreadTodos.ts` /
+ // `aui/useThreadGoal.ts`), primed on thread open by the RPC pair below.
+ // Rendered above the composer next to the gate cards so a five-step task
+ // shows as a checklist ticking off while the agent works through it.
+ useLoadThreadTodos(selectedThreadId ?? null);
+ useLoadThreadGoal(selectedThreadId ?? null);
+ const liveTodos = useThreadTodos(selectedThreadId ?? null);
+ const threadGoal = useThreadGoal(selectedThreadId ?? null);
const runningBackgroundCount = backgroundProcesses.filter(p => p.status === 'running').length;
// `TranscriptOverlays` resolves the open delegation out of this same live
// timeline and renders nothing when the id is absent, so an inline card must
diff --git a/app/src/providers/useOpenHumanExternalStore.ts b/app/src/providers/useOpenHumanExternalStore.ts
index 26453f83c0..fbcff8d30b 100644
--- a/app/src/providers/useOpenHumanExternalStore.ts
+++ b/app/src/providers/useOpenHumanExternalStore.ts
@@ -522,6 +522,45 @@ export function useOpenHumanExternalStore(
[dispatch, threadId]
);
+ /**
+ * Answer a structured human-input request the run is parked on
+ * (`ask_user_clarification`, and any WS-D sub-agent clarification that
+ * reuses `ElicitationAdapter`).
+ *
+ * Every OpenHuman tool is a `type: 'backend'` toolkit entry (`aui/
+ * toolkit.tsx`) — the core executes it, never the browser — so there is no
+ * "resolve this call with a client-computed result" RPC for
+ * `onAddToolResult` to call. What unblocks the parked call is the SAME
+ * mechanism `ChatToolParts.tsx`'s `SubagentCall.onAnswer` already uses for
+ * the sub-agent case: an ordinary next turn through the registered chat
+ * surface, which the core's orchestrator treats as the clarification
+ * reply. Supplying this key is what turns `onAddToolResult` into a real
+ * capability rather than a throw the moment `ElicitationAdapter`'s Send
+ * button is wired to it.
+ */
+ const onAddToolResult = useCallback(
+ async ({ result }: AddToolResultOptions) => {
+ const surface = getChatSurface(threadId);
+ if (!surface) return;
+ const text = typeof result === 'string' ? result : JSON.stringify(result);
+ if (text.trim().length === 0) return;
+ await surface.send(text);
+ },
+ [threadId]
+ );
+
+ /** Same rationale as `onAddToolResult` above, for a resumed (paused) call. */
+ const onResumeToolCall = useCallback(
+ async ({ payload }: { toolCallId: string; payload: unknown }) => {
+ const surface = getChatSurface(threadId);
+ if (!surface) return;
+ const text = typeof payload === 'string' ? payload : JSON.stringify(payload);
+ if (text.trim().length === 0) return;
+ await surface.send(text);
+ },
+ [threadId]
+ );
+
// DO NOT add `dictation: new WebSpeechDictationAdapter()` to the `adapters`
// key below.
//
@@ -576,6 +615,8 @@ export function useOpenHumanExternalStore(
onReload,
setMessages,
onRespondToToolApproval,
+ onAddToolResult,
+ onResumeToolCall,
// Read-aloud for a single message. Supplying this is what makes
// `capabilities.speech` true and the Speak / StopSpeaking controls
// usable — and it must ship WITH the buttons, never before or after