Repository navigation
feat: hide worker threads from UI and disable spawn (#1624) - #1631
Conversation
Worker/subagent threads have no proper UI showcase yet — they spawn as standalone conversation entries with no coherent presentation. Filter them out of the conversation list and stop the orchestrator from spawning them at all until a dedicated surface lands. - app/src/pages/Conversations.tsx: drop threads with `parentThreadId` from `filteredThreads` so workers don't clutter the sidebar. - src/openhuman/tools/orchestrator_tools.rs: comment out the `SpawnWorkerThreadTool` registration. - src/openhuman/tools/impl/agent/spawn_subagent.rs: force `dedicated_thread = false` so `spawn_subagent` always runs inline. Tracking re-enable + showcase in tinyhumansai#1624.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe PR disables the worker-thread feature across backend and UI: the orchestrator stops offering spawn_worker_thread, spawn_subagent rejects/ignores dedicated_thread requests, and the conversation list filters out threads with parentThreadId. ChangesWorker Thread Feature Disable
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@app/src/pages/Conversations.tsx`:
- Around line 941-949: The initial/resume selection logic currently picks from
data.threads and can choose hidden worker/subagent threads; update that code to
use the same top-level-thread filter as filteredThreads (i.e., exclude threads
with parentThreadId and respect selectedLabel) before deciding the initial or
resumed active thread. Concretely, replace usages of data.threads (or the
selector that picks the default thread) with the filteredThreads result (or
replicate the same filter logic: t => !t.parentThreadId && (selectedLabel ===
'all' || t.labels?.includes(selectedLabel))) so the active thread is always one
visible in the sidebar.
In `@src/openhuman/tools/impl/agent/spawn_subagent.rs`:
- Around line 169-177: The code currently ignores the caller's dedicated_thread
request by unconditionally setting dedicated_thread = false; instead read
args.get("dedicated_thread") and, when it is true, return an explicit outcome
(e.g., an Err or a specific RPC response) rather than silently falling back to
inline execution; also emit a debug/trace log on entry showing the requested
dedicated_thread value and a trace log when rejecting/handling a true request so
callers can see their intent was declined. Locate the handling around
args.get("dedicated_thread") and the dedicated_thread binding in
spawn_subagent.rs and replace the silent ignore with a logged decision +
explicit return/result indicating dedicated threads are not supported.
In `@src/openhuman/tools/orchestrator_tools.rs`:
- Around line 73-78: Tests currently still assert that spawn_worker_thread
(SpawnWorkerThreadTool / definition.id == "orchestrator") is registered, but
registration was commented out; update the unit tests to reflect the disabled
registration by removing or changing assertions that expect spawn_worker_thread
to be present and instead assert it is absent (or simply remove it from expected
tool lists), and update any helper/expected-tool-id arrays or assertions that
reference "spawn_worker_thread" or SpawnWorkerThreadTool so the test suite
matches the runtime behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: ce74ce55-ba74-4a41-ac8d-9a9400663271
📒 Files selected for processing (3)
app/src/pages/Conversations.tsxsrc/openhuman/tools/impl/agent/spawn_subagent.rssrc/openhuman/tools/orchestrator_tools.rs
- Conversations.tsx: filter `parentThreadId` threads out of initial/resume selection too, so we can't auto-select a hidden worker thread on load. - spawn_subagent: return an explicit `ToolResult::error` when `dedicated_thread: true` is requested instead of silently downgrading to inline, so callers get a clear signal that the flag is disabled. - orchestrator_tools tests: drop `spawn_worker_thread` from expected tool-name vectors now that the registration is commented out.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/openhuman/tools/impl/agent/spawn_subagent.rs`:
- Around line 169-187: The runtime now rejects dedicated worker threads in
spawn_subagent (see the dedicated_thread_requested check using
args.get("dedicated_thread") and the early return), so update the tool
schema/docs that still describe an enabled worker-thread path to reflect this
rejection: change the dedicated_thread parameter description to state that true
is temporarily unsupported and will be rejected (only false or omission is
allowed), update any examples and help text that claim a worker thread will be
spawned, and adjust schema validation/enum/comments to prohibit or warn about
true so the tool contract matches the spawn_subagent runtime behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 44d96e80-c0a6-487d-b66a-4c489dd12bd4
📒 Files selected for processing (3)
app/src/pages/Conversations.tsxsrc/openhuman/tools/impl/agent/spawn_subagent.rssrc/openhuman/tools/orchestrator_tools.rs
🚧 Files skipped from review as they are similar to previous changes (1)
- src/openhuman/tools/orchestrator_tools.rs
Schema description for `dedicated_thread` still advertised the worker-thread path even though the runtime now rejects requests with `dedicated_thread: true`. Update the description so the LLM-visible contract matches actual behavior and avoids predictable failed calls.
Resolves orchestrator_tools.rs conflict by keeping the collapsed `delegate_to_integrations_agent` from this PR while picking up the `spawn_worker_thread` disable note added upstream (tinyhumansai#1624 / tinyhumansai#1631).
Summary
parentThreadId) out of the main conversation list.spawn_worker_threadand forcespawn_subagent'sdedicated_threadflag tofalse.Problem
When the orchestrator spawns a worker/subagent thread (via
spawn_worker_threadorspawn_subagent { dedicated_thread: true }), the worker thread today shows up as a standalone entry in the user's conversation list with no coherent presentation — no clear title, no progress affordance, no done state, no link back to the parent. The inlineWorkerThreadRefCardinside the parent thread is the only deliberate showcase; the standalone list entry is noise.Solution
Three small changes, all pointing at #1624 for the eventual re-enable:
app/src/pages/Conversations.tsx:filteredThreadsdrops threads whoseparentThreadIdis set, so workers never appear in the sidebar.src/openhuman/tools/orchestrator_tools.rs: theSpawnWorkerThreadTool::new()push is commented out, with an#[allow(unused_imports)]on the import so the orchestrator no longer advertisesspawn_worker_threadto the model.src/openhuman/tools/impl/agent/spawn_subagent.rs: thededicated_threadextraction is commented out and hard-set tofalse, so even if the model requests a dedicated thread the runtime treats it as inline.cargo check --manifest-path Cargo.tomlpasses cleanly (warnings are pre-existing).Submission Checklist
false) and a one-line filter; not exercisable for meaningful coverage gain.Closes #NNNin the## RelatedsectionImpact
Desktop UI: worker threads no longer appear as standalone list entries.
WorkerThreadRefCardinside parent threads continues to render. Backend: orchestrator no longer exposesspawn_worker_thread;spawn_subagentalways runs inline. No migration. No perf or security implications.Related
SpawnWorkerThreadToolregistration anddedicated_threadflag when Showcase worker/subagent threads with a dedicated UI surface #1624 landsAI Authored PR Metadata (required for Codex/Linear PRs)
Linear Issue
Commit & Branch
Validation Run
pnpm --filter openhuman-app format:check— no JS/CSS format-sensitive lines changed (one-line filter addition with project-style indentation)pnpm typecheck— single-property filter; types unchangedcargo check --manifest-path Cargo.tomlcleanValidation Blocked
Behavior Changes
Parity Contract
WorkerThreadRefCardinline rendering unchanged;spawn_subagentinline path unchanged; non-orchestrator agents unaffected.dedicated_threadarg still consumed (viaargs.get) so existing call sites don't error on unknown-arg validation; orchestrator import kept with#[allow(unused_imports)]to ease re-enable.Duplicate / Superseded PR Handling
Summary by CodeRabbit