From 3873821a318417e2c56d63eba76688838ca7672a Mon Sep 17 00:00:00 2001 From: Alex Clarke Date: Tue, 17 Mar 2026 14:57:07 -0600 Subject: [PATCH] fix: Corrected a bug in the coder agent that wasn't outputting a summary of the changes made, so the parent Sisyphus agent has no idea if the agent worked or not --- assets/agents/.shared/utils.sh | 7 +++++-- assets/agents/coder/config.yaml | 12 ++++++------ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/assets/agents/.shared/utils.sh b/assets/agents/.shared/utils.sh index bf631de..601acee 100755 --- a/assets/agents/.shared/utils.sh +++ b/assets/agents/.shared/utils.sh @@ -402,7 +402,6 @@ invoke_agent_with_summary() { summary=$(echo "${output}" | sed -n '/^## Recommendation/,/^## /{/^## Recommendation/d;/^## /d;p}' | sed '/^$/d' | head -10) fi - # Failsafe: extract up to 5 meaningful lines if no markers found if [[ -z "${summary}" ]]; then summary=$(echo "${output}" | grep -v "^$" | grep -v "^#" | grep -v "^\-\-\-" | tail -10 | head -5) fi @@ -411,7 +410,11 @@ invoke_agent_with_summary() { append_context "${agent}" "${summary}" fi - echo "${output}" + if [[ -z "${output}" ]] || [[ -z "$(echo "${output}" | tr -d '[:space:]')" ]]; then + echo "[${agent} agent completed but produced no text output. The agent may have performed work via tool calls (file writes, builds, etc.) that did not generate visible text. Check the project directory for changes.]" + else + echo "${output}" + fi } ########################### diff --git a/assets/agents/coder/config.yaml b/assets/agents/coder/config.yaml index ebb6108..4481420 100644 --- a/assets/agents/coder/config.yaml +++ b/assets/agents/coder/config.yaml @@ -33,7 +33,7 @@ instructions: | 2. Study existing patterns (read 1-2 similar files) 3. Write the code (using tools, NOT chat output) 4. Verify it compiles/builds - 5. Signal completion + 5. Signal completion with a summary ## Todo System @@ -82,12 +82,13 @@ instructions: | ## Completion Signal - End with: + When done, end your response with a summary so the parent agent knows what happened: + ``` - CODER_COMPLETE: [summary of what was implemented] + CODER_COMPLETE: [summary of what was implemented, which files were created/modified, and build status] ``` - Or if failed: + Or if something went wrong: ``` CODER_FAILED: [what went wrong] ``` @@ -103,5 +104,4 @@ instructions: | ## Context - Project: {{project_dir}} - CWD: {{__cwd__}} - - Shell: {{__shell__}} - + - Shell: {{__shell__}} \ No newline at end of file