Skip to content

Commit 3bf5484

Browse files
author
Test User
committed
reduce CI token costs: 1x/day schedule, Haiku for sub-agents, no retries
- evolve.yml: cron 3x/day → 1x/day at 4am UTC; remove both retry steps - evolve.sh: add FAST_MODEL (Haiku); use it for build-fix, journal, and issue-response agents
1 parent 7889dbc commit 3bf5484

File tree

2 files changed

+5
-29
lines changed

2 files changed

+5
-29
lines changed

.github/workflows/evolve.yml

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Evolution
22

33
on:
44
schedule:
5-
- cron: '0 */8 * * *' # every 8 hours
5+
- cron: '0 4 * * *' # once per day at 4am UTC
66
workflow_dispatch: # manual trigger
77

88
permissions:
@@ -55,28 +55,3 @@ jobs:
5555
chmod +x scripts/evolve.sh
5656
./scripts/evolve.sh
5757
58-
- name: Retry after 15min
59-
id: attempt2
60-
if: steps.attempt1.outcome == 'failure'
61-
continue-on-error: true
62-
env:
63-
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
64-
REPO: ${{ github.repository }}
65-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
66-
FORCE_RUN: ${{ github.event_name == 'workflow_dispatch' && 'true' || '' }}
67-
run: |
68-
echo "Waiting 15 minutes before retry..."
69-
sleep 900
70-
./scripts/evolve.sh
71-
72-
- name: Retry after 45min
73-
if: steps.attempt1.outcome == 'failure' && steps.attempt2.outcome == 'failure'
74-
env:
75-
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
76-
REPO: ${{ github.repository }}
77-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
78-
FORCE_RUN: ${{ github.event_name == 'workflow_dispatch' && 'true' || '' }}
79-
run: |
80-
echo "Waiting 45 minutes before retry..."
81-
sleep 2700
82-
./scripts/evolve.sh

scripts/evolve.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ fi
3030
# ── Configuration ──
3131
REPO="${REPO:-$(git remote get-url origin 2>/dev/null | sed 's|.*github.com[:/]||;s|\.git$||' || echo "owner/code-evolve")}"
3232
MODEL="${MODEL:-claude-sonnet-4-6}"
33+
FAST_MODEL="${FAST_MODEL:-claude-haiku-4-5-20251001}"
3334
TIMEOUT="${TIMEOUT:-3600}"
3435
PROJECT_DIR="${PROJECT_DIR:-src}"
3536
BIRTH_DATE="${BIRTH_DATE:-$(date +%Y-%m-%d)}"
@@ -514,7 +515,7 @@ Steps:
514515
3. Run the verification commands and keep fixing until they pass
515516
4. Commit: git add -A && git commit -m "Day $DAY ($SESSION_TIME): fix build errors"
516517
FIXEOF
517-
${TIMEOUT_CMD:+$TIMEOUT_CMD 300} claude -p --model "$MODEL" \
518+
${TIMEOUT_CMD:+$TIMEOUT_CMD 300} claude -p --model "$FAST_MODEL" \
518519
--allowedTools "Bash,Read,Write,Edit,Glob,Grep" \
519520
< "$FIX_PROMPT" || true
520521
rm -f "$FIX_PROMPT"
@@ -551,7 +552,7 @@ Then 2-4 sentences: what you did, what worked, what's next.
551552
Be specific and honest. Then commit: git add JOURNAL.md && git commit -m "Day $DAY ($SESSION_TIME): journal entry"
552553
JEOF
553554

554-
${TIMEOUT_CMD:+$TIMEOUT_CMD 120} claude -p --model "$MODEL" \
555+
${TIMEOUT_CMD:+$TIMEOUT_CMD 120} claude -p --model "$FAST_MODEL" \
555556
--allowedTools "Bash,Read,Write,Edit" \
556557
< "$JOURNAL_PROMPT" || true
557558
rm -f "$JOURNAL_PROMPT"
@@ -599,7 +600,7 @@ Separate multiple with "---". Only claim "fixed" if fully resolved.
599600
IEOF
600601

601602
AGENT_EXIT=0
602-
${TIMEOUT_CMD:+$TIMEOUT_CMD 120} claude -p --model "$MODEL" \
603+
${TIMEOUT_CMD:+$TIMEOUT_CMD 120} claude -p --model "$FAST_MODEL" \
603604
--allowedTools "Bash,Read,Write,Edit" \
604605
< "$ISSUE_PROMPT" || AGENT_EXIT=$?
605606
rm -f "$ISSUE_PROMPT"

0 commit comments

Comments
 (0)