Skip to content

fix: resume unknown slash command emits unknown_slash_command error_kind (#827)#3201

Merged
code-yeongyu merged 1 commit into
mainfrom
fix/unknown-slash-command-kind-827
May 29, 2026
Merged

fix: resume unknown slash command emits unknown_slash_command error_kind (#827)#3201
code-yeongyu merged 1 commit into
mainfrom
fix/unknown-slash-command-kind-827

Conversation

@code-yeongyu
Copy link
Copy Markdown
Collaborator

Fixes ROADMAP #827.

Before: claw --resume latest --output-format json /boguserror_kind:"unknown" (opaque)
After: claw --resume latest --output-format json /boguserror_kind:"unknown_slash_command" (typed)

Root cause: format_unknown_slash_command() emitted a message without a classifier-friendly prefix, so classify_error_kind fell through to the generic "unknown" fallback.

Fix: Prefix message with unknown_slash_command: and add classifier arm.

Tests: 1 new regression test, 572 pass.

Both direct-slash CLI path (claw /boguscommand) and resume slash path
(claw --resume session /boguscommand) previously emitted error_kind:unknown
(opaque fallback). Machine consumers could not distinguish unrecognized
slash commands from other error classes.

Fix:
- format_unknown_direct_slash_command: prefix with 'unknown_slash_command:'
- format_unknown_slash_command (resume path): prefix with 'unknown_slash_command:'
- Add classifier arm for 'unknown_slash_command:' prefix

One new regression test: direct_unknown_slash_command_emits_typed_error_kind
Uses the direct-slash CLI path (no session load needed; reproducible on CI).

572 tests pass, 1 pre-existing worker_boot failure unrelated.
@code-yeongyu code-yeongyu force-pushed the fix/unknown-slash-command-kind-827 branch from ee5e112 to 74b0378 Compare May 29, 2026 06:39
@code-yeongyu code-yeongyu merged commit 9d05573 into main May 29, 2026
6 checks passed
@code-yeongyu code-yeongyu deleted the fix/unknown-slash-command-kind-827 branch May 29, 2026 07:00
@1716775457damn
Copy link
Copy Markdown

Clean fix. The prefix-based classifier arm is a minimal, targeted approach and the regression test covers the exact case well.

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.

2 participants