Before this change, `sf headless autonomous` only dispatched units for
the active milestone — never touched .sf/self-feedback.jsonl. The
existing `sf headless triage --apply` was a manual operator path
required for self-feedback to become actionable work. Defeats the
"SF self-heals" thesis: 146 entries can sit in the queue indefinitely
while the autonomous loop happily cranks on M005.
Now: at autonomous startup (not on resume, not on initial bootstrap)
SF calls handleTriage({ apply: true, max: 5 }) to drain the top-5
candidates from the triage queue before entering the dispatch loop.
The bound at max=5 keeps the upfront cost bounded; remaining items
process on the next session_start.
The comment on the existing triage handler in headless.ts:917-921
explicitly acknowledged the gap — autonomous-loop followUp delivery
was broken (sf-mp4rxkwb-l4baga). Wiring the deterministic triage
path BEFORE the dispatch loop closes that gap.
Opt-out: pass --skip-triage on the autonomous command (e.g. when
debugging a specific milestone without backlog churn).
Triage failures are non-fatal — they log a warning and the
autonomous loop continues with its existing milestone dispatch.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| resources | ||
| tests | ||
| web | ||
| app-paths.ts | ||
| bundled-extension-paths.ts | ||
| bundled-resource-path.ts | ||
| claude-cli-check.ts | ||
| cli-key.ts | ||
| cli-logs.ts | ||
| cli-stats.ts | ||
| cli-status.ts | ||
| cli-web-branch.ts | ||
| cli.ts | ||
| env.ts | ||
| errors.ts | ||
| extension-discovery.ts | ||
| extension-registry.ts | ||
| headless-answers.ts | ||
| headless-context.ts | ||
| headless-events.ts | ||
| headless-feedback.ts | ||
| headless-import-backlog.ts | ||
| headless-mark-state.ts | ||
| headless-query.ts | ||
| headless-reflect.ts | ||
| headless-status.ts | ||
| headless-triage.ts | ||
| headless-types.ts | ||
| headless-ui.ts | ||
| headless-uok-status.ts | ||
| headless-usage.ts | ||
| headless.ts | ||
| help-text.ts | ||
| interactive-session-lock.ts | ||
| loader.ts | ||
| logger.ts | ||
| logo.ts | ||
| models-resolver.ts | ||
| onboarding.ts | ||
| pi-migration.ts | ||
| project-sessions.ts | ||
| provider-migrations.ts | ||
| remote-questions-config.ts | ||
| resource-loader.ts | ||
| rtk.ts | ||
| security-overrides.ts | ||
| startup-model-validation.ts | ||
| startup-timings.ts | ||
| tool-bootstrap.ts | ||
| traces.ts | ||
| update-check.ts | ||
| update-cmd.ts | ||
| web-mode.ts | ||
| welcome-screen.ts | ||
| wizard.ts | ||
| worktree-cli.ts | ||
| worktree-name-gen.ts | ||