Repository navigation
fix(plan): accepting a plan switches to auto-accept mode by default - #714
Conversation
The default Accept action now switches to auto-accept mode so an already-reviewed plan executes without per-action approval. A new 'Approve Each Step' option (key: s) keeps standard mode for cautious runs; Reject is unchanged.
|
@claude Is it ready for merge? |
|
Claude finished @edenreich's task in 5m 55s —— View job Merge-readiness review: PR #714
Verdict: Code is solid, but there are stale docs to fix first
|
| File | Line | Problem |
|---|---|---|
docs/plan-mode.md |
38-40 | "accepted → flips back to Standard (or Auto-Accept if you chose 'Accept & Auto-Approve')" — now Accept defaults to Auto-Accept |
docs/plan-mode.md |
123-129 | Lists old three options ("Accept → Standard", "Accept & Auto-Approve") |
docs/plan-mode.md |
137-138 | References "Accept & Auto-Approve" |
docs/commands-reference.md |
301-303 | "Accept: … (stays in Plan Mode)" + "Accept & Auto-Approve (a)" — wrong label and stale a key |
docs/tools-reference.md |
537 | "shows … Accept, Reject, and Accept & Auto-Approve options" |
These should read: Accept (Enter/y) → Auto-Accept; Approve Each Step (s) → Standard; Reject (n) → ends session.
One heads-up (by design, not a blocker) 🔎
The default Accept (Enter) now drops into Auto-Accept mode. Per this repo's model that means the bash allow-list becomes the .* sentinel (unrestricted) and per-action approval is off for the whole execution — a real increase in the default's blast radius. This is exactly what #710 asked for and mirrors Claude Code's own "accept plan → auto-accept" UX, and the system_prompt_auto destructive-action policy is swapped in as the guardrail (mode-driven via getSystemPromptForMode, so it kicks in automatically). Flagging only so the escalation of the default is a conscious choice.
Recommendation
Not quite ready — the code is merge-quality, but update the 3 doc files above (or file a fast-follow) so the docs match shipped behavior. Want me to push the doc fixes to this branch?
· branch fix/plan-accept-auto-mode
Accepting a plan (Enter/y) now switches to Auto-Accept mode; a new 'Approve Each Step' option (s) keeps Standard mode. Update plan-mode, commands-reference, and tools-reference to match the shipped UX.
## [0.127.0](v0.126.0...v0.127.0) (2026-07-02) ### 🚀 Features * **plan:** compact context and start a fresh session when a plan is approved ([#705](#705)) ([28ddba7](28ddba7)) * **memory:** configurable git sync backend ([#707](#707)) ([6a68c3d](6a68c3d)), closes [#670](#670) [#670](#670) * **history:** each subagent gets its own history file ([#711](#711)) ([16c8fa1](16c8fa1)), closes [#699](#699) ### 🐛 Bug Fixes * **plan:** accepting a plan switches to auto-accept mode by default ([#714](#714)) ([7b0befc](7b0befc)), closes [#710](#710) * **tools:** guard concurrent gitignore and screenshot caches ([#713](#713)) ([0ff4276](0ff4276)), closes [#712](#712) * **tools:** guard Registry.tools with RWMutex against concurrent MCP registration ([#709](#709)) ([8a70871](8a70871)), closes [#708](#708) * **ui:** update dim color from [#565f89](https://github.com/inference-gateway/cli/issues/565f89) to [#7a7f9a](https://github.com/inference-gateway/cli/issues/7a7f9a) for improved contrast ([#706](#706)) ([b2ee67e](b2ee67e)) ### 🔧 Build System * **deps:** bump github.com/go-telegram/bot from 1.21.0 to 1.22.0 in the gomod group ([#703](#703)) ([3de5136](3de5136)) * **deps:** bump the github-actions group with 5 updates ([#704](#704)) ([80221f7](80221f7))
|
🎉 This PR is included in version 0.127.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
## Summary
Fixes the flood of `unknown keybinding action` warnings in
`~/.infer/logs/app-<date>.log` - about **84 lines per `infer chat`
launch** (42 warn + 42 error), even with a stock `infer init` config.
## Root cause
- **Structural drift (the flood).** `config.GetDefaultKeybindings()`
includes 41 namespace-path actions (`chat_focus_attachments`, all
`diff_viewer_*`, all `explorer_*`) that are consumed directly via
`config.ResolveNamespaceBindings` and are never registered in the
runtime `Registry`. `(*Registry).ApplyConfigOverrides` warned for every
config ID absent from the registry, so it false-flagged all 41 on every
launch. The CLI validator `getValidActionIDs()` shared the same blind
spot.
- **Logger misuse (doubled the noise).** `registry.go:364` called
`logger.Warn("... '%s' ...", actionID)`, but `logger.Warn(msg, args...)`
forwards to zap's key/value sugared API (`Warnw`). So `%s` never
expanded and the trailing `actionID` became a dangling key - which is
why zap added a second, `error`-level `Ignored key without a value.`
line.
## Fix
- New `config.DefaultKeybindingActionIDs()` - the config-side valid-ID
set.
- `ApplyConfigOverrides` now warns only for IDs in **neither** the
registry **nor** the defaults (exact-ID match, so genuine typos and
stale/removed IDs still warn once), and logs structured (`"action",
id`). The sibling misuse at `registry.go:36` is fixed too.
- New `Registry.KnownActionIDs()` (registry union defaults); the CLI
validator uses it so `infer keybindings validate/set/enable/disable`
agree with the runtime.
- Regression tests: a stock config is silent; a genuine/namespace typo
warns exactly once with a structured `action` field and zero `Ignored
key` lines; the validator includes namespace-path IDs.
## Verification
- `task build`, `task lint` (0 issues), `go test ./...` all pass.
- `infer keybindings validate` against a real stale config: **42 -> 1**
unknown ID (only the genuinely-removed
`plan_approval_..._accept_and_auto_approve` from #714). Runtime flood
drops from 84 lines/launch to at most 1 clean structured warning.
## Notes
- No config regeneration - `GetDefaultKeybindings()` output is
unchanged.
- The doubled `plan_approval_plan_approval_` prefix is intentionally
left as-is (identical between registry and defaults; renaming would
break existing user configs).
- The same printf-style structured-logger misuse exists at ~18 other
call sites (same defect class, malformed logs); tracked separately in
#723.
Closes #722
## [0.128.0](v0.127.0...v0.128.0) (2026-07-03) ### 🚀 Features * **chat:** make status indicators selectable with /tools and /a2a views ([#732](#732)) ([6882de0](6882de0)), closes [#717](#717) [#717](#717) ### 🐛 Bug Fixes * **agent:** drop redundant Idle transition that errored on every run ([#726](#726)) ([469ec64](469ec64)), closes [#722](#722) [#725](#725) * **agent:** report session-cumulative total_turns in completion logs ([#728](#728)) ([0d8fb08](0d8fb08)), closes [#727](#727) * **a2a:** route active A2A reads and HasPending through the job supervisor ([#693](#693)) ([#721](#721)) ([dcd0670](dcd0670)), closes [#718](#718) [#719](#719) [#720](#720) * **keybindings:** stop "unknown keybinding action" log flood ([#724](#724)) ([c828426](c828426)), closes [#714](#714) [#722](#722) * **a2a:** unify background-job liveness, clear, and cancel on the supervisor contract ([#730](#730)) ([eb37fd0](eb37fd0)), closes [#693](#693) [#720](#720) [#718](#718) [#719](#719) * **logging:** use structured key/value form at misused call sites ([#729](#729)) ([cd96028](cd96028)), closes [#722](#722) [#724](#724) [#724](#724) [#723](#723) * **tools:** wait for pipe readers before reaping detached bash shells ([#716](#716)) ([e1d0d84](e1d0d84)), closes [#696](#696) ### ⚡ Performance Improvements * **tui:** cache per-entry rendering and keep the Update loop responsive ([#731](#731)) ([8c9db0d](8c9db0d)) ### 📚 Documentation * **a2a:** add SKILL.md documentation for Agent2Agent protocol ([defcd57](defcd57)) ### 🔧 Build System * **deps:** bump golang.org/x/net from 0.47.0 to 0.55.0 in /examples/mcp/mcp-server ([#715](#715)) ([990803b](990803b)) ### 🧹 Maintenance * **flox:** bump dev deps ([d0c8f6b](d0c8f6b))
Summary
Accepting a plan dropped the agent into standard mode, forcing per-action approval during execution — the friction reported in #710. The default Accept now switches to auto-accept mode, so an already-reviewed plan executes without re-approving every step.
Behavior
The plan-approval prompt now offers:
Enter/ysnThe cautious per-step path is preserved as an explicit choice, so no capability is lost. The mode is set on the
StateManagerrather than the conversation, so it survives the post-approval context compaction + fresh session from #705.Changes
applyPlanDecision(approval coordinator):Accept→AutoAccept; newAcceptStandard→Standard.PlanApprovalAcceptAndAutoApprove→PlanApprovalAcceptStandard.a→s.RequestPlanApprovaltool result + prompt copy to describe the new options.Testing
task test— full suite passestask lint— 0 issues (golangci-lint + markdownlint)Closes #710