Metadata
| Status | done ‖ paused |
|---|---|
| Assigned | agent-863 |
| Agent identity | 02e879681e52e0a384106169be043416c4d946e850ab26b2269c57681b52a6e7 |
| Created | 2026-07-26T08:47:02.389066225+00:00 |
| Started | 2026-07-26T08:54:33.771779728+00:00 |
| Completed | 2026-07-26T09:23:21.842227336+00:00 |
| Tokens | 13857796 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
--freshto 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-profilediscards 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
- (none)
Required by
Log
- 2026-07-26T08:47:02.375864130+00:00 Task paused
- 2026-07-26T08:47:09.910412666+00:00 Task published
- 2026-07-26T08:54:33.848044447+00:00 Spawned by coordinator --executor pi --model openai-codex:gpt-5.6-sol --isolation required-worktree
- 2026-07-26T08:54:49.326990076+00:00 Starting implementation; inspecting prior WIP and retry/profile resolution paths.
- 2026-07-26T09:09:05.427583529+00:00 Implemented atomic --current-profile resolution/pinning, unit coverage for all retryable states and drift, docs/help, and credential-free terminal smoke; focused retry tests and smoke pass.
- 2026-07-26T09:19:04.779683023+00:00 Validation: cargo fmt --check and cargo clippy pass; 37 retry tests pass; credential-free retry_current_profile smoke passes. Full cargo test compiles after repairing 3 stale Task initializers, then reaches unrelated pre-existing legacy non-Pi expectation failures (28 under serial; focused changed tests are green).
- 2026-07-26T09:22:54.268655258+00:00 Committed: 91892c13 — pushed to remote
- 2026-07-26T09:23:12.880996069+00:00 Validated acceptance criteria: exact unpinned/pinned route+reasoning snapshot, post-retry profile-flip stability, all five held/hung states, worktree preserve/fresh, log+structured provenance, help/docs, fail-closed no-fallback terminal smoke. cargo fmt --check, cargo clippy, cargo build, 37 focused retry tests, and owned smoke pass.
- 2026-07-26T09:23:21.842233376+00:00 Task marked as done
- 2026-07-26T09:40:46.078413455+00:00 Task paused