Skip to content

Commit eb03bdc

Browse files
AdametherzLabclaude
andcommitted
fix: scout stale-state overwrite + correct micro model ID
- Scout was loading state at start, then calling addWorkItem (which saves atomically), then overwriting with stale state at end — wiping the queue. Fixed: reload fresh state before final save to preserve work items. - Changed micro tier from gemini-2.5-flash-lite-preview (invalid) to gemini-2.5-flash-lite (correct OpenRouter model ID). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 0da6699 commit eb03bdc

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

src/agents/scout.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,11 @@ export async function runScout(): Promise<{ reposScanned: number; workItemsQueue
132132
}
133133
}
134134

135-
state.lastScoutRun = new Date().toISOString();
136-
saveState(state);
135+
// Reload fresh state to preserve work items added by addWorkItem() above
136+
const freshState = loadState();
137+
freshState.repoAudits = state.repoAudits;
138+
freshState.lastScoutRun = new Date().toISOString();
139+
saveState(freshState);
137140

138141
award("scout", "quality-improvement", `Scanned ${reposToAudit.length} repos, queued ${workItemsQueued} items`);
139142
console.log(`[scout] Scanned ${reposToAudit.length} repos, queued ${workItemsQueued} work items`);

src/model-router.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import type { AgentRole } from "./types";
77

88
const MODELS: Record<ModelTier, ModelConfig> = {
99
micro: {
10-
id: "google/gemini-2.5-flash-lite-preview",
10+
id: "google/gemini-2.5-flash-lite",
1111
inputCostPer1M: 0.075,
1212
outputCostPer1M: 0.30,
1313
maxContext: 1_000_000,

0 commit comments

Comments
 (0)