Metadata
| Status | done |
|---|---|
| Assigned | agent-867 |
| Agent identity | 7ae4731fae60d11b5cea1f066f583a4986346cf86fc7005ee8373bd0980ae13b |
| Created | 2026-07-26T09:53:58.953981997+00:00 |
| Started | 2026-07-26T10:11:58.240419179+00:00 |
| Completed | 2026-07-26T10:47:37.823056977+00:00 |
| Tokens | 15915213 in / 33479 out |
Description
Objective
Add a supported atomic way to remove a task's explicit execution-route pin and return it to normal profile inheritance. This is distinct from wg retry --current-profile, which snapshots and writes a new exact pin.
CLI contract
Preferred surface: wg edit <task> --clear-route-pin (choose an equally explicit spelling only if CLI consistency requires it).
Atomically clear all task-level route-affecting state for future execution:
- preferred
model - structured
reasoningoverride - deprecated/legacy
providerfield - route-specific persisted Pi/Claude session identity
Do not erase historical actual_executor, actual_model, attempt provenance, usage, evaluation evidence, logs, worktree, or task status. The command edits inheritance metadata only; it does not itself retry or spawn the task. Plain wg edit behavior remains backward compatible.
Semantics
- After clearing, the next new attempt resolves from whichever project profile is effective at dispatch time; this dynamic inheritance is intentional and must be clearly distinguished from deterministic
wg retry --current-profile. - Emit a clear audit log naming every cleared field and the profile that would currently inherit, without pinning it.
- For an in-progress attempt, preserve its recorded actual route/session and make the clear apply only to a future attempt; fail closed if the data model cannot represent that safely.
- Keep Pi/direct-Codex/direct-Claude execution systems explicit and never introduce fallback.
Validation
- A pinned task becomes model/reasoning/provider/session-unpinned in one command.
- Historical actual route, usage, provenance, status, and worktree remain unchanged.
- Its next attempt inherits the then-current profile; a profile flip before dispatch is reflected because this command intentionally clears rather than snapshots.
- In-progress behavior is safe and tested.
-
wg show --jsonand human output distinguish inherited/unpinned from exact task pins. -
Help/docs contrast
--clear-route-pinwithretry --current-profile. - Permanent credential-free human-flow smoke test passes.
-
cargo fmt --check,cargo clippy, and focused tests pass.
Work independently from direct-Codex restoration. Minimize shared CLI-file edits and message the Codex task if an unavoidable overlap is discovered.
Depends on
- (none)
Required by
Log
- 2026-07-26T09:53:58.939952487+00:00 Task paused
- 2026-07-26T09:54:04.472454137+00:00 Task published
- 2026-07-26T10:11:58.321832850+00:00 Spawned by coordinator --executor pi --model openai-codex:gpt-5.6-sol --isolation required-worktree
- 2026-07-26T10:12:10.908594494+00:00 Starting implementation; inspecting prior WIP and existing edit/retry/session patterns.
- 2026-07-26T10:14:38.430627338+00:00 CLI overlap is unavoidable (src/cli.rs + src/main.rs); notified restore-explicit-codex-chat and will keep edits limited to Edit flag plumbing.
- 2026-07-26T10:32:29.798363145+00:00 Implemented atomic clear path, in-progress fail-closed preservation, show route-pin state, docs, unit tests, and permanent credential-free terminal smoke; beginning installed-binary validation.
- 2026-07-26T10:47:00.436288020+00:00 Validated: cargo fmt --check and plain cargo clippy pass; cargo build passes; focused clear/show/triage tests pass; installed-binary clear_route_pin smoke passes. Full cargo test reached 3813 passes but baseline has 28 unrelated stale legacy route tests (claude/openrouter aliases and recover endpoint) failing under the current Pi/Codex-only branch; focused task coverage is green.
- 2026-07-26T10:47:23.407120144+00:00 Committed: cf8deee0 — pushed to remote
- 2026-07-26T10:47:34.050253554+00:00 Validated task criteria: one-command atomic unpin; history/worktree/status preserved; dynamic project-profile flip shown; safe live-attempt provenance plus fail-closed missing registry; JSON/human route-pin rendering; help/docs contrast; owned credential-free smoke PASS.
- 2026-07-26T10:47:37.823070117+00:00 Task marked as done