Skip to content

Commit 7fa81b5

Browse files
committed
fix(#760): agent_not_found and plugin_not_found envelopes now include hint field
1 parent ef31328 commit 7fa81b5

3 files changed

Lines changed: 6 additions & 0 deletions

File tree

ROADMAP.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7685,3 +7685,5 @@ Original filing (2026-04-18): the session emitted `SessionStart hook (completed)
76857685
758. **Three remaining `missing value for --X` strings in `parse_init_args` were still untyped** — dogfooded 2026-05-26 on `02d77ae1`. `--cwd`, `--date`, `--session` missing-value errors in the init-args parser used the old plain-string form with no `missing_flag_value:` prefix and no `\n` hint, unlike the main `parse_args` flags fixed in #756/#757. Fix: applied `missing_flag_value:` prefix + `\n` usage hint to all three. `grep '"missing value for --'` now returns zero results outside of test assertions. Source: Jobdori dogfood sweep on `02d77ae1`, 2026-05-26.
76867686

76877687
759. **`--model badmodel --output-format json` returned `error_kind:"invalid_model_syntax"` but `hint: null`** — dogfooded 2026-05-26 on `b8b3af6f`. `validate_model_syntax()` had hint text embedded after a period in the error string (no `\n`), so `split_error_hint()` could not extract it. Affected paths: (a) generic invalid format `"invalid model syntax: '{}'. Expected ..."` — joined with `.` not `\n`; (b) spaces-in-model `"contains spaces. Use ..."` — same issue; (c) empty model string — no hint at all. Fix: added `\n` before hint text in all three format strings in `validate_model_syntax`. Source: Jobdori dogfood sweep on `b8b3af6f`, 2026-05-26.
7688+
7689+
760. **`agent_not_found` and `plugin_not_found` error envelopes lacked `hint` field** — dogfooded 2026-05-26 on `ef31328a`. `claw agents show nonexistent-agent --output-format json` returned `error_kind:"agent_not_found"` with `hint: null`; same for `claw plugins show`. Both structured JSON envelopes in `commands/src/lib.rs` and `main.rs` omitted `hint`. Fix: added `"hint": "Run \`claw agents list\` to see available agents."` to the `agent_not_found` envelope; `"hint": "Run \`claw plugins list\` to see available plugins."` to the `plugin_not_found` envelope. Source: Jobdori dogfood sweep on `ef31328a`, 2026-05-26.

rust/crates/commands/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2468,6 +2468,8 @@ pub fn handle_agents_slash_command_json(args: Option<&str>, cwd: &Path) -> std::
24682468
"requested": name,
24692469
// #734: parity with skills show which always emits a message field
24702470
"message": format!("agent '{}' not found", name),
2471+
// #760: hint so callers know how to enumerate available agents
2472+
"hint": "Run `claw agents list` to see available agents.",
24712473
}));
24722474
}
24732475
Ok(render_agents_report_json_with_action(cwd, &matched, "show"))

rust/crates/rusty-claude-cli/src/main.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6227,6 +6227,8 @@ impl LiveCli {
62276227
"requested": name,
62286228
// #734: parity with skills show which always emits a message field
62296229
"message": format!("plugin '{}' not found", name),
6230+
// #760: hint so callers know how to enumerate available plugins
6231+
"hint": "Run `claw plugins list` to see available plugins.",
62306232
});
62316233
println!("{}", serde_json::to_string_pretty(&obj)?);
62326234
return Ok(());

0 commit comments

Comments
 (0)