Skip to content

fix: direct-slash resume-safe commands route to CliAction instead of interactive_only (#831)#3205

Open
code-yeongyu wants to merge 2 commits into
mainfrom
fix/direct-slash-resume-safe-831
Open

fix: direct-slash resume-safe commands route to CliAction instead of interactive_only (#831)#3205
code-yeongyu wants to merge 2 commits into
mainfrom
fix/direct-slash-resume-safe-831

Conversation

@code-yeongyu
Copy link
Copy Markdown
Collaborator

Fixes ROADMAP #831.

Before:

  • claw /statuserror_kind:"interactive_only"
  • claw /differror_kind:"interactive_only"
  • claw /versionerror_kind:"interactive_only"
  • claw /doctorerror_kind:"interactive_only"
  • claw /sandboxerror_kind:"interactive_only"

After: Same output as claw status / claw diff / claw version etc.

Root cause: parse_direct_slash_command only had explicit arms for /help, /agents, /mcp, /skills. All other SlashCommand variants fell to the generic interactive_only arm.

Tests: 1 new integration test, 572+ pass.

…#830)

`claw --output-format json mcp show` (no server name) previously emitted
error_kind:"unknown_mcp_action" — misleading because `show` IS a known
action; the problem is a missing required argument.

Fix:
- `render_mcp_report_json_for`: `Some("show")` arm now emits a dedicated
  JSON response with error_kind:"missing_argument" + usage hint
- `classify_error_kind`: add classifier arm for "missing_argument:" prefix

One new test: mcp_show_missing_server_name_emits_missing_argument

572+ tests pass.
…interactive_only (#831)

`claw /status`, `claw /diff`, `claw /version`, `claw /doctor`,
`claw /sandbox` all returned interactive_only because the direct-slash
handler only had explicit arms for /help, /agents, /mcp, /skills.
Other resume-safe slash commands fell through to the generic
`Ok(Some(command)) => Err(interactive_only...)` arm.

Fix: add explicit routing arms for SlashCommand::Status, ::Diff,
::Version, ::Doctor, ::Sandbox in `parse_direct_slash_command`.

One new integration test: direct_slash_resume_safe_commands_route_correctly
(covers /version, /sandbox, /diff)

572+ tests pass.
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