Summary
When using the workflow tool with ultracode mode in a non-git home directory, subagent bash commands hang for extremely long periods (~48 minutes) before erroring out, causing the workflow to fail.
Steps to Reproduce
- Run the harness from a non-git home directory (e.g.,
~/)
- Trigger
ultracode mode with a prompt that causes the harness to dispatch a workflow with subagents
- Subagents try
codedb searches, which fail with: ✗ refusing to index temporary root: /Users/limyuxi
- Subagents fall back to
bash grep commands on the home directory
Observed Behavior (from harness.trace.jsonl)
t=52353 codedb → 53 bytes (empty/refusal)
t=52353 codedb → 53 bytes (empty/refusal)
... (all codedb calls return refusal)
t=104850 bash → 131KB result (47s)
t=111838 bash → 7KB result (18ms)
t=355561 bash → ERROR (131KB, 243s)
t=2990381 bash → ERROR (24 bytes, 2878s / ~48min)
t=2990439 bash → ERROR (24 bytes, 2878s)
t=2990451 bash → ERROR (131KB, 2936s / ~49min)
t=2990532 bash → ERROR (131KB, 2936s)
Impact
- Workflow phase 1 subagents both reported
ok: false
- Phase 2 synthesis task never ran (
ms: 0)
- Main turn ended with
"detail": "Interrupted"
- Total wasted time: ~49 minutes
Suspected Root Cause
- Subagents don't have a reasonable timeout for bash commands
- When codedb refuses to index the cwd, subagents fall back to unfiltered
grep on the entire home directory which scans massive amounts of data
- No early termination or escalation path when codedb repeatedly fails
Relevant Files
src/main.zig — subagent spawning and bash command execution
src/main.zig:2799 and :2804 — thinking animation lines (tangentially related to user's original request)
Trajectory Logs
Full trajectory available at:
harness.trace.jsonl (23 events)
harness.trajectory.jsonl (same directory)
Session version: 0.0.167
Harness version: simple-harness sdk-v0.3.1-34-g0418fa1-dirty
Suggested Fix
- Add a configurable/default timeout for subagent bash commands (e.g., 60s)
- When codedb returns a refusal, subagents should report the error immediately instead of falling back to expensive unfiltered grep
- Consider whitelisting safe cwd paths or providing a clearer error when codedb cannot index the current directory
Summary
When using the
workflowtool withultracodemode in a non-git home directory, subagent bash commands hang for extremely long periods (~48 minutes) before erroring out, causing the workflow to fail.Steps to Reproduce
~/)ultracodemode with a prompt that causes the harness to dispatch a workflow with subagentscodedbsearches, which fail with:✗ refusing to index temporary root: /Users/limyuxibash grepcommands on the home directoryObserved Behavior (from harness.trace.jsonl)
Impact
ok: falsems: 0)"detail": "Interrupted"Suspected Root Cause
grepon the entire home directory which scans massive amounts of dataRelevant Files
src/main.zig— subagent spawning and bash command executionsrc/main.zig:2799and:2804— thinking animation lines (tangentially related to user's original request)Trajectory Logs
Full trajectory available at:
harness.trace.jsonl(23 events)harness.trajectory.jsonl(same directory)Session version:
0.0.167Harness version:
simple-harness sdk-v0.3.1-34-g0418fa1-dirtySuggested Fix