From b4b426f197f5ebe9871c6295ce27c397099af80e Mon Sep 17 00:00:00 2001 From: marcusquinn <6428977+marcusquinn@users.noreply.github.com> Date: Sun, 8 Feb 2026 19:45:19 +0000 Subject: [PATCH 1/2] chore: mark t175 blocked in TODO.md --- TODO.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TODO.md b/TODO.md index b4adc3d69..24e681127 100644 --- a/TODO.md +++ b/TODO.md @@ -127,7 +127,7 @@ Tasks with no open blockers - ready to work on. Use `/ready` to refresh this lis - Notes: PR #642 merged. Added `--headless` flag to full-loop for autonomous worker operation. - [ ] t175 Fix `ambiguous_skipped_ai` evaluation — add better heuristic signals #bug #supervisor ~1h (ai:40m) ref:GH#644 assignee:marcusquinn started:2026-02-08T19:38:50Z logged:2026-02-08 - - Notes: Recurring evaluation outcome across batches. Evaluator can't determine success/failure, skips AI eval, defaults to retry. Add heuristics: check for commits on branch, check for uncommitted changes in worktree. + - Notes: Recurring evaluation outcome across batches. Evaluator can't determine success/failure, skips AI eval, defaults to retry. Add heuristics: check for commits on branch, check for uncommitted changes in worktree. BLOCKED: Re-prompt dispatch failed: ambiguous_skipped_ai - [ ] t176 Add uncertainty guidance to worker dispatch prompt #feature #supervisor ~30m (ai:20m) ref:GH#645 assignee:marcusquinn started:2026-02-08T19:38:55Z logged:2026-02-08 - Notes: Workers don't know when to make autonomous decisions vs flag uncertainty. Add decision framework to dispatch prompt for headless workers. From 4268f9b350435b1a2f3b60c47311d25a8ac04cad Mon Sep 17 00:00:00 2001 From: marcusquinn <6428977+marcusquinn@users.noreply.github.com> Date: Sun, 8 Feb 2026 19:49:10 +0000 Subject: [PATCH 2/2] hotfix: use NUL-delimited IPC for dispatch command builder build_dispatch_cmd() used echo (newline-delimited) to pass arguments back to cmd_dispatch(), but multi-line prompts (worker restrictions, memory context) caused read -r to split a single prompt argument into multiple array elements. Workers received the prompt as many separate positional args instead of one, causing opencode to misparse and exit with help text. Fix: use printf '%s\0' (NUL-delimited) output and read -r -d '' to preserve multi-line strings as single arguments through the IPC boundary. --- .agents/scripts/supervisor-helper.sh | 36 +++++++++++++++------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/.agents/scripts/supervisor-helper.sh b/.agents/scripts/supervisor-helper.sh index a8d297b9f..21ccf4322 100755 --- a/.agents/scripts/supervisor-helper.sh +++ b/.agents/scripts/supervisor-helper.sh @@ -2595,29 +2595,30 @@ build_dispatch_cmd() { $memory_context" fi + # Use NUL-delimited output so multi-line prompts stay as single arguments if [[ "$ai_cli" == "opencode" ]]; then - echo "opencode" - echo "run" - echo "--format" - echo "json" + printf '%s\0' "opencode" + printf '%s\0' "run" + printf '%s\0' "--format" + printf '%s\0' "json" if [[ -n "$model" ]]; then - echo "-m" - echo "$model" + printf '%s\0' "-m" + printf '%s\0' "$model" fi - echo "--title" - echo "$task_id" - echo "$prompt" + printf '%s\0' "--title" + printf '%s\0' "$task_id" + printf '%s\0' "$prompt" else # claude CLI - echo "claude" - echo "-p" - echo "$prompt" + printf '%s\0' "claude" + printf '%s\0' "-p" + printf '%s\0' "$prompt" if [[ -n "$model" ]]; then - echo "--model" - echo "$model" + printf '%s\0' "--model" + printf '%s\0' "$model" fi - echo "--output-format" - echo "json" + printf '%s\0' "--output-format" + printf '%s\0' "json" fi return 0 @@ -3101,8 +3102,9 @@ cmd_dispatch() { log_info "Log: $log_file" # Build and execute dispatch command + # Use NUL-delimited read to preserve multi-line prompts as single arguments local -a cmd_parts=() - while IFS= read -r part; do + while IFS= read -r -d '' part; do cmd_parts+=("$part") done < <(build_dispatch_cmd "$task_id" "$worktree_path" "$log_file" "$ai_cli" "$memory_context" "$tmodel" "$tdesc")