singularity-forge/src/resources
Mikael Hugo 1a681caa86 fix(auto): repair retries reuse session context instead of starting cold
When the autonomous solver fails to produce a checkpoint and enters the
repair loop, subsequent retries previously called newSession() each time,
wiping the conversation history. The agent restarted cold with no memory
of what it had tried, what tools it had called, or why it failed — making
meaningful repair nearly impossible.

This change adds a keepSession option to runUnit(). When true, the
newSession() call and session-switch guard logic are skipped; the repair
prompt is sent as a follow-up in the existing conversation. The agent can
now see its prior tool calls, file reads, and failure context when deciding
how to fix the issue.

Policy:
- First attempt at each unit: keepSession=false (clean session, correct
  for independent slice boundaries — system prompt carries project state)
- Repair retries within the same unit: keepSession=true (agent carries
  full context of what it already tried)
- Next unit after success/failure: keepSession=false (clean boundary)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-10 02:50:57 +02:00
..
agents fix: harden sift codebase indexing 2026-05-05 13:31:35 +02:00
extensions fix(auto): repair retries reuse session context instead of starting cold 2026-05-10 02:50:57 +02:00
skills feat: improve sf runtime self-reload and safeguards 2026-05-08 23:52:35 +02:00
workflow-skills sf snapshot: uncommitted changes after 131m inactivity 2026-05-09 02:53:47 +02:00
workflows sf snapshot: uncommitted changes after 49m inactivity 2026-05-08 01:07:24 +02:00
SF-WORKFLOW.md sf snapshot: uncommitted changes after 110m inactivity 2026-05-08 00:17:47 +02:00
traces.ts sf snapshot: uncommitted changes after 49m inactivity 2026-05-08 01:07:24 +02:00