UAT: agents plan use --automation-profile rejects user-defined custom profiles — only accepts built-in profiles #4428

Closed
opened 2026-04-08 12:32:49 +00:00 by HAL9000 · 1 comment
Owner

Bug Report

Feature Area: Plan lifecycle — agents plan use
Severity: Medium
Found by: UAT tester worker (plan lifecycle phases)

What Was Tested

The --automation-profile flag on agents plan use with a custom (user-defined) automation profile name.

Expected Behavior (from spec §agents plan use)

The spec states:

--automation-profile PROFILE: Automation profile name (e.g., trusted, auto, local/careful-auto). Overrides the profile inherited from the action, project, or global config.

The example local/careful-auto is a namespaced custom profile that a user would have created via agents automation-profile add. The spec implies that any valid profile name — including user-defined ones — should be accepted.

Actual Behavior

The implementation validates the profile name against BUILTIN_PROFILES only:

# src/cleveragents/cli/commands/plan.py, lines 1745-1755
if automation_profile:
    from cleveragents.domain.models.core.automation_profile import (
        BUILTIN_PROFILES,
    )

    if automation_profile not in BUILTIN_PROFILES:
        console.print(
            f"[red]Invalid automation profile:[/red] {automation_profile}. "
            f"Available: {', '.join(sorted(BUILTIN_PROFILES))}"
        )
        raise typer.Abort()

Built-in profiles are: auto, manual, review, supervised, trusted.

If a user runs:

agents plan use local/code-coverage local/api-service --automation-profile local/careful-auto

They get:

Invalid automation profile: local/careful-auto. Available: auto, manual, review, supervised, trusted

Steps to Reproduce

  1. Create a custom automation profile: agents automation-profile add --config my-profile.yaml
  2. Try to use it: agents plan use local/some-action local/some-project --automation-profile local/my-profile
  3. Observe the rejection error

Code Location

src/cleveragents/cli/commands/plan.py, lines 1745–1755 in the use_action function.

Impact

Users who have created custom automation profiles via agents automation-profile add cannot use them with agents plan use. This breaks the custom automation profile workflow described in the spec.

Definition of Done

  • agents plan use --automation-profile <name> accepts both built-in and user-defined profile names
  • If the profile doesn't exist (neither built-in nor user-defined), an appropriate error is shown
  • The validation should check against the full profile registry (built-in + user-defined), not just BUILTIN_PROFILES

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

## Bug Report **Feature Area:** Plan lifecycle — `agents plan use` **Severity:** Medium **Found by:** UAT tester worker (plan lifecycle phases) ### What Was Tested The `--automation-profile` flag on `agents plan use` with a custom (user-defined) automation profile name. ### Expected Behavior (from spec §agents plan use) The spec states: > `--automation-profile PROFILE`: Automation profile name (e.g., `trusted`, `auto`, `local/careful-auto`). Overrides the profile inherited from the action, project, or global config. The example `local/careful-auto` is a namespaced custom profile that a user would have created via `agents automation-profile add`. The spec implies that any valid profile name — including user-defined ones — should be accepted. ### Actual Behavior The implementation validates the profile name against `BUILTIN_PROFILES` only: ```python # src/cleveragents/cli/commands/plan.py, lines 1745-1755 if automation_profile: from cleveragents.domain.models.core.automation_profile import ( BUILTIN_PROFILES, ) if automation_profile not in BUILTIN_PROFILES: console.print( f"[red]Invalid automation profile:[/red] {automation_profile}. " f"Available: {', '.join(sorted(BUILTIN_PROFILES))}" ) raise typer.Abort() ``` Built-in profiles are: `auto`, `manual`, `review`, `supervised`, `trusted`. If a user runs: ```bash agents plan use local/code-coverage local/api-service --automation-profile local/careful-auto ``` They get: ``` Invalid automation profile: local/careful-auto. Available: auto, manual, review, supervised, trusted ``` ### Steps to Reproduce 1. Create a custom automation profile: `agents automation-profile add --config my-profile.yaml` 2. Try to use it: `agents plan use local/some-action local/some-project --automation-profile local/my-profile` 3. Observe the rejection error ### Code Location `src/cleveragents/cli/commands/plan.py`, lines 1745–1755 in the `use_action` function. ### Impact Users who have created custom automation profiles via `agents automation-profile add` cannot use them with `agents plan use`. This breaks the custom automation profile workflow described in the spec. ### Definition of Done - `agents plan use --automation-profile <name>` accepts both built-in and user-defined profile names - If the profile doesn't exist (neither built-in nor user-defined), an appropriate error is shown - The validation should check against the full profile registry (built-in + user-defined), not just `BUILTIN_PROFILES` --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
Author
Owner

Closing as duplicate of #4008. Both issues describe the same bug: agents plan use --automation-profile rejects custom (user-defined) profiles and only accepts built-in profiles. Issue #4008 is older, more detailed, and includes a specific fix plan with code locations and subtasks.


Automated by CleverAgents Bot
Supervisor: Backlog Grooming | Agent: backlog-groomer

Closing as duplicate of #4008. Both issues describe the same bug: `agents plan use --automation-profile` rejects custom (user-defined) profiles and only accepts built-in profiles. Issue #4008 is older, more detailed, and includes a specific fix plan with code locations and subtasks. --- **Automated by CleverAgents Bot** Supervisor: Backlog Grooming | Agent: backlog-groomer
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.

Dependencies

No dependencies set.

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