fix: bug: architect-run.sh empty pitch — pitch_output=$(agent_run …) captures stdout but new agent_run writes to side-channels (#716)
Three fixes: 1. architect-run.sh:722 — extract `.result` not `.content` from claude JSON output. All other callers (dev-agent, formula-session) use `.result`; this was the direct cause of every pitch being empty. 2. lib/agent-sdk.sh — reset `_AGENT_LAST_OUTPUT=""` at the top of each `agent_run` call so stale data from a prior invocation can't bleed into the next caller when claude crashes or returns empty. 3. lib/agent-sdk.sh — scope the diagnostics file by `$LOG_AGENT` instead of hardcoding `dev/`. Concurrent agents (architect, gardener, planner, predictor) no longer clobber each other's diag output. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
a1da3d5c52
commit
cb9381f1e4
2 changed files with 6 additions and 2 deletions
|
|
@ -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}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue