You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
optimize: session-outlier detector flags every project's founding/bootstrap session as waste #664
detectSessionOutliers in src/optimize.ts flags a project's founding/bootstrap session as a "high-cost session outlier," even though it's legitimate one-off scaffolding work, not waste.
Concretely: a brand-new project's first session ran the full build pipeline in one sitting — brainstorm → plan → subagent-driven-development (24 agent dispatches) → build → promote to v1.0 prod. It cost 26.5x the project's (still-thin, 2-3 session) average and got flagged by the outlier detector. The detector's leave-one-out average math is fine; the issue is that a founding session is a different kind of work than a routine session in the same project, not an expensive instance of the same kind. No cost multiplier threshold can distinguish those — it's a category error, not a magnitude one. This pattern is structural: it will recur for every new project's first session, every time.
Why it matters
The finding is user-facing ("N high-cost session outliers... usually come from broad prompts, runaway loops, or context-heavy work that should be split into smaller sessions") — for a founding session that framing is actively wrong and could push someone to needlessly second-guess a normal project kickoff.
Suggested fix
The exclusion mechanism for this already exists — detectSessionOutliers takes an excludedSessionIds set, currently populated from other findings for cross-finding dedup:
Each session already carries firstTimestamp, so identifying each project's earliest session is a cheap addition to the same set:
constfirstSessionIds=newSet(projects.map(p=>p.sessions.reduce((min,s)=>!min||s.firstTimestamp<min.firstTimestamp ? s : min,null)?.sessionId).filter(Boolean));constoutlierExclusions=newSet([...lowWorthSessionIds, ...contextBloatVisibleIds, ...firstSessionIds]);
Happy to be wrong about "earliest session" being the right proxy — a project could ramp up its founding work across 2-3 sessions rather than one — but it matched the case I hit, and it's cheap/available data versus something like detecting the subagent-driven-development pattern by tool-call shape, which would be far more fragile.
Environment
codeburn 0.9.15, via codeburn optimize --format json, Windows.
Activity
fix(optimize): exclude a young project's founding session from cost-o…