fix: read pitch output from $_AGENT_LAST_OUTPUT, not stdout (#690)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful

agent_run() stores its output in $_AGENT_LAST_OUTPUT but never emits
it to stdout. The old subshell capture always yielded an empty string,
so pitches silently failed even after the signature fix.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Claude 2026-04-11 21:59:36 +00:00
parent ef89b64f5f
commit e4dbe68317

View file

@ -515,12 +515,11 @@ ${pitch_context}
" "
# Execute stateless claude -p call # Execute stateless claude -p call
local pitch_output agent_run "$pitch_prompt" 2>>"$LOGFILE" || true
pitch_output=$(agent_run "$pitch_prompt" 2>>"$LOGFILE") || true
# Extract pitch content from JSON response # Extract pitch content from JSON response
local pitch local pitch
pitch=$(printf '%s' "$pitch_output" | jq -r '.content // empty' 2>/dev/null) || pitch="" pitch=$(printf '%s' "$_AGENT_LAST_OUTPUT" | jq -r '.content // empty' 2>/dev/null) || pitch=""
if [ -z "$pitch" ]; then if [ -z "$pitch" ]; then
log "WARNING: empty pitch generated for vision issue #${issue_num}" log "WARNING: empty pitch generated for vision issue #${issue_num}"