claude-evolve 1.0.17 → 1.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/claude-evolve-run +13 -1
- package/package.json +1 -1
package/bin/claude-evolve-run
CHANGED
|
@@ -228,12 +228,24 @@ if [[ $id == "000" || $id == "0" ]]; then
|
|
|
228
228
|
echo "[INFO] Baseline algorithm - skipping mutation, using original"
|
|
229
229
|
else
|
|
230
230
|
echo "[INFO] Calling Claude $CLAUDE_MODEL to apply mutation..."
|
|
231
|
-
|
|
231
|
+
echo "[DEBUG] Claude command: $claude_cmd --model $CLAUDE_MODEL -p"
|
|
232
|
+
|
|
233
|
+
# Save prompt to temp file for debugging
|
|
234
|
+
local prompt_file="/tmp/claude-evolve-prompt-$$.txt"
|
|
235
|
+
echo "$prompt" > "$prompt_file"
|
|
236
|
+
echo "[DEBUG] Prompt saved to: $prompt_file ($(wc -l < "$prompt_file") lines)"
|
|
237
|
+
|
|
238
|
+
# Try with explicit pipe and error capture - NEED -p flag for piped input!
|
|
239
|
+
if ! generated_code=$(echo "$prompt" | "$claude_cmd" --model $CLAUDE_MODEL -p 2>&1); then
|
|
232
240
|
echo "[ERROR] Claude failed to generate algorithm mutation" >&2
|
|
241
|
+
echo "[ERROR] Claude output: $generated_code" >&2
|
|
242
|
+
rm -f "$prompt_file"
|
|
233
243
|
update_csv_row "$row_num" "" "failed"
|
|
234
244
|
exit 1
|
|
235
245
|
fi
|
|
236
246
|
|
|
247
|
+
rm -f "$prompt_file"
|
|
248
|
+
|
|
237
249
|
# Save generated algorithm (overwrite the copied file)
|
|
238
250
|
echo "$generated_code" >"$output_file"
|
|
239
251
|
echo "[INFO] Claude successfully mutated algorithm"
|