add-retry-current

Add retry --current-profile

Metadata

Statusdone ‖ paused
Assignedagent-863
Agent identity02e879681e52e0a384106169be043416c4d946e850ab26b2269c57681b52a6e7
Created2026-07-26T08:47:02.389066225+00:00
Started2026-07-26T08:54:33.771779728+00:00
Completed2026-07-26T09:23:21.842227336+00:00
Tokens13857796 in / 25371 out

Description

Objective

Add an explicit, deterministic command for retrying a task under the current project profile instead of silently retaining a stale task-level route. Proposed surface: wg retry <task> --current-profile (final spelling may be --use-current-profile if consistency requires).

Semantics

  • Resolve the current project profile's exact task-agent executor/model/reasoning at retry-command time and persist that exact selection on the new source attempt. Do not defer resolution until a later dispatcher tick, where a profile flip could create drift.
  • Replace stale task-level model/reasoning/executor/session selection for the new attempt while preserving the existing worktree by default. Compose with --fresh to discard WIP and with the existing evaluation-held recovery path.
  • Record the selected profile name/generation and exact route in the retry log/audit output.
  • Work for Pi profiles now and explicit native Codex/Claude profiles when those adapters are supported. Never create implicit cross-system fallback.
  • Keep plain wg retry <task> backward compatible.

Validation

  • An unpinned task retried with the flag records the current profile's exact route/reasoning.
  • A task pinned to an old model is atomically repinned to the current profile.
  • A profile change after the retry command but before spawn does not alter the attempt's recorded selection.
  • Works for failed, incomplete, in-progress/hung, pending-eval, and failed-pending-eval retryable states.
  • Default retry preserves the worktree; --fresh --current-profile discards it.
  • Help/docs and a permanent credential-free smoke scenario cover the human command flow.
  • cargo fmt --check, cargo clippy, and focused tests pass.

Depends on

Required by

Log