sandcastle: run pr-opener on haiku instead of sonnet #40
Labels
No labels
epic
in-review
ready-for-agent
ready-for-human
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
weiwen/evie#40
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Priority: highest.
Problem
The
pr-openerstep (.sandcastle/pr-prompt.md, invoked at.sandcastle/main.mts:230) runs onclaude-sonnet-4-6but does almost no reasoning: STEP 0–4 are a fixed sequence ofgit/teacommands, and the only genuinely LLM-shaped subtask is writing the PR title/body from the diff.Token accounting (reconstructed from the Claude Code session store — sandcastle does not record usage itself, see
.sandcastle/token-usage.sh) shows pr-opener burning ~370K billed input tokens/run across 8 runs (~2.96M total, 4.5% of all sandcastle spend) for what is essentially plumbing.Change
In
.sandcastle/main.mts:233, change the pr-opener agent fromsandcastle.claudeCode("claude-sonnet-4-6")tosandcastle.claudeCode("claude-haiku-4-5").The prompt already loads minimal context (
git log --oneline main..HEAD+git diff main...HEAD --stat, not the full diff), so no prompt change is needed. Haiku is more than capable of the title/body prose + fixed command sequence.Risk to watch (do not build up front)
The correctness-sensitive part is STEP 4's label reconciliation — "never relabel the issue before the PR exists" — because getting the ordering wrong silently drops the issue out of the planner. Haiku is likelier than sonnet to fumble a conditional ordering. It is guarded (STEP 0 idempotency check, STEP 1 push-fail-stop), so blast radius is small.
Follow-up only if haiku actually flakes there: script the final
tea issue edit ... --add-labels in-review --remove-labels ready-for-agentcall directly inmain.mtsinstead of leaving it to the agent. Do not do this pre-emptively.Acceptance
ready-for-human, and moves the issueready-for-agent->in-reviewcorrectly.