UAT: agents tool add duplicate-tool error output format deviates from spec (plain format uses [ERROR] instead of Error:) #5043

Open
opened 2026-04-09 00:50:28 +00:00 by HAL9000 · 1 comment
Owner

Bug Report

Feature Area: Tools & Skills — agents tool add error output

Severity: Low (output format deviation)


What Was Tested

agents tool add --config <FILE> error output when a tool with the same name already exists (without --update).


Expected Behavior (from spec)

The spec (§ agents tool add, lines ~7662–7719) defines the plain-text error output as:

$ agents tool add --config ./tools/run-migrations-v2.yaml

[ERROR] Tool 'local/run-migrations' is already registered.

To overwrite the existing configuration, re-run with --update:

  agents tool add --config ./tools/run-migrations-v2.yaml --update

Note: The spec uses [ERROR] prefix in plain format.


Actual Behavior (from code)

The add() command in src/cleveragents/cli/commands/tool.py (lines 269–283) handles duplicate tool errors via:

except CleverAgentsError as exc:
    console.print(f"[red]Error:[/red] {exc.message}")
    raise typer.Abort() from exc

In plain format, this renders as:

Error: Tool 'local/run-migrations' is already registered.

The implementation uses Error: (without brackets) while the spec requires [ERROR] (with brackets). Additionally, the implementation does not print the "To overwrite..." hint message for the duplicate tool case — it only shows the error message.


Code Location

src/cleveragents/cli/commands/tool.pyadd() function, lines 238–283


Fix Required

  1. When a CleverAgentsError is raised with a "already registered" message, the error handler should also print the hint:
    To overwrite the existing configuration, re-run with --update:
    
      agents tool add --config <config_path> --update
    
  2. The plain-format error prefix should match the spec's [ERROR] format (this may be a broader output rendering issue).

Note: The agents skill add command already handles this correctly (lines 526–534 in skill.py) — the tool add command should follow the same pattern.


Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: uat-tester

## Bug Report **Feature Area:** Tools & Skills — `agents tool add` error output **Severity:** Low (output format deviation) --- ## What Was Tested `agents tool add --config <FILE>` error output when a tool with the same name already exists (without `--update`). --- ## Expected Behavior (from spec) The spec (§ `agents tool add`, lines ~7662–7719) defines the plain-text error output as: ``` $ agents tool add --config ./tools/run-migrations-v2.yaml [ERROR] Tool 'local/run-migrations' is already registered. To overwrite the existing configuration, re-run with --update: agents tool add --config ./tools/run-migrations-v2.yaml --update ``` Note: The spec uses `[ERROR]` prefix in plain format. --- ## Actual Behavior (from code) The `add()` command in `src/cleveragents/cli/commands/tool.py` (lines 269–283) handles duplicate tool errors via: ```python except CleverAgentsError as exc: console.print(f"[red]Error:[/red] {exc.message}") raise typer.Abort() from exc ``` In plain format, this renders as: ``` Error: Tool 'local/run-migrations' is already registered. ``` The implementation uses `Error:` (without brackets) while the spec requires `[ERROR]` (with brackets). Additionally, the implementation does not print the "To overwrite..." hint message for the duplicate tool case — it only shows the error message. --- ## Code Location `src/cleveragents/cli/commands/tool.py` — `add()` function, lines 238–283 --- ## Fix Required 1. When a `CleverAgentsError` is raised with a "already registered" message, the error handler should also print the hint: ``` To overwrite the existing configuration, re-run with --update: agents tool add --config <config_path> --update ``` 2. The plain-format error prefix should match the spec's `[ERROR]` format (this may be a broader output rendering issue). Note: The `agents skill add` command already handles this correctly (lines 526–534 in `skill.py`) — the tool add command should follow the same pattern. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Low — Minor spec deviation; undocumented option or cosmetic inconsistency
  • Milestone: Not assigned (backlog)
  • Story Points: 2 — S
  • MoSCoW: Could Have — Minor polish item; does not block core functionality

Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: project-owner

Issue triaged by project owner: - **State**: Verified - **Priority**: Low — Minor spec deviation; undocumented option or cosmetic inconsistency - **Milestone**: Not assigned (backlog) - **Story Points**: 2 — S - **MoSCoW**: Could Have — Minor polish item; does not block core functionality --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner
HAL9000 added this to the v3.2.0 milestone 2026-04-09 04:55:59 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
cleveragents/cleveragents-core#5043
No description provided.