Skip to content

Retry failed active-turn steers - #162

Merged
XIAZY merged 1 commit into
mainfrom
fix/daemon-steer-retry
Jul 15, 2026
Merged

Retry failed active-turn steers#162
XIAZY merged 1 commit into
mainfrom
fix/daemon-steer-retry

Conversation

@XIAZY

@XIAZY XIAZY commented Jul 15, 2026

Copy link
Copy Markdown
Owner

Summary

  • roll back steeredForMeSig when an active-turn steer write fails so the same inbox signature can retry
  • guard that rollback by the exact runtime process, active turn, and attempted signature so a stale failure cannot erase newer delivery state
  • preserve successful steer deduplication and the benign no-active-turn path
  • document the retained 2026-07-12 production-path proof that direct mid-turn steering works on Claude CLI 2.1.205

Root cause

The supervisor marked a for-me signature as steered before writing to runtime stdin. Any write failure returned without clearing that marker, so subsequent reconciles treated the notification as already delivered forever.

The direct Claude steering mechanism itself is unchanged. A live production-path probe proved current Claude CLI behavior safely consumes a steer during an active tool call, so this PR intentionally adds no speculative tool/compaction gating state.

Validation

Red-first on unchanged origin/main 355df3fe:

  • TestAgentSessionFailedSteerRetriesSameInboxSignature: RED with got 1 attempts want 2
  • no-active-turn retry row: RED with the same one-attempt failure

Exact patched head:

  • focused four-row selector: PASS
  • focused four-row selector under -race -count=50: PASS
  • full daemon/internal/syncer under -race: PASS
  • go test ./...: PASS
  • go vet ./...: PASS
  • go build ./...: PASS
  • git diff --check: PASS

Acceptance rows cover retry after failure, stale process/turn/signature no-clobber, successful dedupe, and no-active-turn behavior.

@XIAZY
XIAZY marked this pull request as ready for review July 15, 2026 04:00
@XIAZY
XIAZY merged commit afa8dd8 into main Jul 15, 2026
8 checks passed
XIAZY added a commit that referenced this pull request Jul 15, 2026
Revert #162 (steer-retry) to un-break main after stale-base merge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant