Merge pull request 'fix: bug: architect-run.sh empty pitch — pitch_output=$(agent_run …) captures stdout but new agent_run writes to side-channels (#716)' (#720) from fix/issue-716 into main
All checks were successful
ci/woodpecker/push/ci Pipeline was successful

This commit is contained in:
dev-bot 2026-04-12 00:16:05 +00:00
commit 2f75478aab
2 changed files with 6 additions and 2 deletions

View file

@ -719,7 +719,7 @@ ${pitch_context}
# Extract pitch content from JSON response
local pitch
pitch=$(printf '%s' "$_AGENT_LAST_OUTPUT" | jq -r '.content // empty' 2>/dev/null) || pitch=""
pitch=$(printf '%s' "$_AGENT_LAST_OUTPUT" | jq -r '.result // empty' 2>/dev/null) || pitch=""
if [ -z "$pitch" ]; then
log "WARNING: empty pitch generated for vision issue #${issue_num}"

View file

@ -131,6 +131,8 @@ agent_run() {
done
local prompt="${1:-}"
_AGENT_LAST_OUTPUT=""
local -a args=(-p "$prompt" --output-format json --dangerously-skip-permissions --max-turns 200)
[ -n "$resume_id" ] && args+=(--resume "$resume_id")
[ -n "${CLAUDE_MODEL:-}" ] && args+=(--model "$CLAUDE_MODEL")
@ -171,7 +173,9 @@ agent_run() {
# Save output for diagnostics (no_push, crashes)
_AGENT_LAST_OUTPUT="$output"
local diag_file="${DISINTO_LOG_DIR:-/tmp}/dev/agent-run-last.json"
local diag_dir="${DISINTO_LOG_DIR:-/tmp}/${LOG_AGENT:-dev}"
mkdir -p "$diag_dir" 2>/dev/null || true
local diag_file="${diag_dir}/agent-run-last.json"
printf '%s' "$output" > "$diag_file" 2>/dev/null || true
# Nudge: if the model stopped without pushing, resume with encouragement.