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
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
###########################
|
||||
|
||||
@@ -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__}}
|
||||
Reference in New Issue
Block a user