Skip to content

fix: /approve and /deny outside REPL emit interactive_only error_kind (#828)#3202

Merged
code-yeongyu merged 1 commit into
mainfrom
fix/approve-deny-interactive-only-828
May 29, 2026
Merged

fix: /approve and /deny outside REPL emit interactive_only error_kind (#828)#3202
code-yeongyu merged 1 commit into
mainfrom
fix/approve-deny-interactive-only-828

Conversation

@code-yeongyu
Copy link
Copy Markdown
Collaborator

Fixes ROADMAP #828.

Before: claw --output-format json /approveerror_kind:"unknown_slash_command"
After: claw --output-format json /approveerror_kind:"interactive_only"

Root cause: /approve, /yes, /deny, /no are not SlashCommand enum variants, so they fell through to format_unknown_direct_slash_command. They're valid REPL-only commands that require an active tool call.

Fix: Intercept them in SlashCommand::Unknown arm with a dedicated interactive_only: message.

Tests: 1 new test covering all 4 aliases. 572 pass.

…#828)

/approve, /yes, /deny, /no (and /y, /n) are valid REPL-only slash
commands. Outside the REPL they were falling through to
format_unknown_direct_slash_command -> error_kind:unknown_slash_command.

Fix: intercept them in the SlashCommand::Unknown arm and emit
interactive_only: prefix so classify_error_kind returns the correct kind.

One new test: approve_deny_outside_repl_emits_interactive_only (covers
/approve, /yes, /deny, /no)

572 tests pass, 1 pre-existing worker_boot failure unrelated.
@code-yeongyu code-yeongyu merged commit 187aebd into main May 29, 2026
6 checks passed
@code-yeongyu code-yeongyu deleted the fix/approve-deny-interactive-only-828 branch May 29, 2026 07:37
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