[agent]
Agent: Claude Code (claude-sonnet-4-6) — caro-qa-agent
Problem
caro ai --once "<prompt>" produces zero output to stderr or stdout while the embedded backend attempts (and fails) to download the model. The command hangs silently for the full model-download retry window, then exits with status 1 — leaving users with no indication that anything is happening. By contrast, caro -p "..." --dry-run emits clear WARN-level download-attempt messages and a user-friendly error within ~15 seconds.
A shell widget that calls caro ai --once to populate a prompt buffer would appear completely frozen with no feedback.
Reproduction
# Build from source (no pre-downloaded model)
cargo build --release --features embedded-cpu
CARO=./target/release/caro
# Hangs silently, no output whatsoever to stderr or stdout
timeout 35 $CARO ai --once "list files in current directory" 2>&1
echo "Exit: $?"
# → (empty)
# → Exit: 124 (killed by timeout)
# Compare: regular dry-run DOES emit progress
timeout 35 $CARO -p "list files in current directory" --dry-run 2>&1
# → WARN caro::model_loader: Download attempt 1/3 failed, retrying in 2s...
# → WARN caro::model_loader: Download attempt 2/3 failed, retrying in 4s...
# → Error: Command generation failed: Backend is not available: ...
Expected vs Actual
Expected: caro ai --once mirrors the regular command path — either emits download-attempt WARN messages to stderr as the model loads, or detects upfront that no backend is ready and exits with a helpful error immediately (before attempting download).
Actual: Zero output to stderr/stdout for the entire retry window (35+ seconds in sandbox), then exits via SIGTERM. No progress indicator, no error message, no guidance.
Environment
- caro version:
1.5.0 (be07b22 2026-07-18)
- OS:
Linux 6.18.44-fc-v24 x86_64 (remote sandbox)
- Test date: 2026-09-12
- Backend: embedded (no pre-downloaded model, HuggingFace binary downloads blocked at proxy layer)
Investigation
src/main.rs:1072 — run_ai_once() calls CliApp::with_overrides().await then run_once() (which calls backend.generate_command().await). No progress is written to stderr at any point before generate_command returns.
src/ai/runner.rs:115-119 — inv.backend.generate_command(&request).await is where the model download blocks. WARN logs originate in caro::model_loader but are not observable in the AI path (possibly the logger is not initialized before this point, or the subscriber suppresses output during the await).
src/main.rs:1095-1097 — ai.enabled guard produces an immediate error; this is not the hang.
- Unit tests: 23/23 pass using a mock backend — the feature is correctly implemented for the happy path. The bug is in the error/progress path only.
caro doctor correctly reports "No ready backend available" — but caro ai --once does not call this check before attempting generation.
Severity
P2 — Feature works when a model is available (unit tests confirm). But the user-facing error path is broken: no feedback during a potentially 35+ second hang makes the feature appear frozen. Shell widgets depending on --once would leave users unable to distinguish "generating" from "hung".
Prompt used to generate this comment
caro QA agent — daily rotation slot A+B+C, scheduled remote run 2026-09-12
[agent]Agent: Claude Code (
claude-sonnet-4-6) — caro-qa-agentProblem
caro ai --once "<prompt>"produces zero output to stderr or stdout while the embedded backend attempts (and fails) to download the model. The command hangs silently for the full model-download retry window, then exits with status 1 — leaving users with no indication that anything is happening. By contrast,caro -p "..." --dry-runemits clear WARN-level download-attempt messages and a user-friendly error within ~15 seconds.A shell widget that calls
caro ai --onceto populate a prompt buffer would appear completely frozen with no feedback.Reproduction
Expected vs Actual
Expected:
caro ai --oncemirrors the regular command path — either emits download-attempt WARN messages to stderr as the model loads, or detects upfront that no backend is ready and exits with a helpful error immediately (before attempting download).Actual: Zero output to stderr/stdout for the entire retry window (35+ seconds in sandbox), then exits via SIGTERM. No progress indicator, no error message, no guidance.
Environment
1.5.0 (be07b22 2026-07-18)Linux 6.18.44-fc-v24 x86_64(remote sandbox)Investigation
src/main.rs:1072—run_ai_once()callsCliApp::with_overrides().awaitthenrun_once()(which callsbackend.generate_command().await). No progress is written to stderr at any point beforegenerate_commandreturns.src/ai/runner.rs:115-119—inv.backend.generate_command(&request).awaitis where the model download blocks. WARN logs originate incaro::model_loaderbut are not observable in the AI path (possibly the logger is not initialized before this point, or the subscriber suppresses output during the await).src/main.rs:1095-1097—ai.enabledguard produces an immediate error; this is not the hang.caro doctorcorrectly reports "No ready backend available" — butcaro ai --oncedoes not call this check before attempting generation.Severity
P2 — Feature works when a model is available (unit tests confirm). But the user-facing error path is broken: no feedback during a potentially 35+ second hang makes the feature appear frozen. Shell widgets depending on
--oncewould leave users unable to distinguish "generating" from "hung".Prompt used to generate this comment