UAT: agents server connect missing --token option — server.token not persisted by connect command #2562

Closed
opened 2026-04-03 18:54:31 +00:00 by freemo · 2 comments
Owner

Bug Report

What Was Tested

The agents server connect CLI command (src/cleveragents/cli/commands/server.py) was analyzed against the specification's server-collaboration requirements.

Expected Behavior (from spec)

The specification (§Server and Client Architecture, §Configuration Reference) defines two required server configuration keys:

  • server.url — URL of the CleverAgents A2A server endpoint
  • server.token — Authentication token (obtained via server registration or team invite)

The spec states (§30524):

server.token | string | (not set) | CLEVERAGENTS_SERVER_TOKEN | Authentication token for server mode. Required when server.url is set.

The spec also states (§23570):

Client authenticates using the declared scheme — typically Authorization: Bearer <server.token> header

The agents server connect command is the primary UX entry point for configuring a server connection. It should accept and persist the authentication token alongside the server URL.

Actual Behavior

The server_connect command signature is:

@app.command("connect")
def server_connect(
    server_url: str,
    namespace: str = "default",
    tls_verify: bool = True,
    fmt: str = "rich",
) -> None:

There is no --token parameter. The command only persists three config values:

svc.set_value("server.url", config.server_url)
svc.set_value("server.namespace", config.namespace)
svc.set_value("server.tls-verify", config.tls_verify)

server.token is never set by agents server connect. Users who use this command to configure their server connection will have no authentication token configured, causing all server-mode operations to fail with auth errors.

Code Location

  • src/cleveragents/cli/commands/server.pyserver_connect() function (line 99–174)
  • src/cleveragents/a2a/server_config.pyServerConnectionConfig model has auth_token_ref: str | None = None but this field is unused in the connect command

Steps to Reproduce

  1. Run agents server connect https://agents.example.com
  2. Run agents config get server.token
  3. Observe: server.token is not set — no token was persisted

Impact

Any user who configures server mode via agents server connect will have no authentication token, making all server-mode A2A operations fail. The spec explicitly states server.token is required when server.url is set.

Suggested Fix

Add a --token option to server_connect:

token: Annotated[
    str | None,
    typer.Option("--token", "-t", help="Authentication token for server mode"),
] = None,

And persist it:

if token:
    svc.set_value("server.token", token)

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

## Bug Report ### What Was Tested The `agents server connect` CLI command (`src/cleveragents/cli/commands/server.py`) was analyzed against the specification's server-collaboration requirements. ### Expected Behavior (from spec) The specification (§Server and Client Architecture, §Configuration Reference) defines two required server configuration keys: - `server.url` — URL of the CleverAgents A2A server endpoint - `server.token` — Authentication token (obtained via server registration or team invite) The spec states (§30524): > `server.token` | string | *(not set)* | `CLEVERAGENTS_SERVER_TOKEN` | Authentication token for server mode. **Required when `server.url` is set.** The spec also states (§23570): > Client authenticates using the declared scheme — typically `Authorization: Bearer <server.token>` header The `agents server connect` command is the primary UX entry point for configuring a server connection. It should accept and persist the authentication token alongside the server URL. ### Actual Behavior The `server_connect` command signature is: ```python @app.command("connect") def server_connect( server_url: str, namespace: str = "default", tls_verify: bool = True, fmt: str = "rich", ) -> None: ``` **There is no `--token` parameter.** The command only persists three config values: ```python svc.set_value("server.url", config.server_url) svc.set_value("server.namespace", config.namespace) svc.set_value("server.tls-verify", config.tls_verify) ``` `server.token` is **never set** by `agents server connect`. Users who use this command to configure their server connection will have no authentication token configured, causing all server-mode operations to fail with auth errors. ### Code Location - `src/cleveragents/cli/commands/server.py` — `server_connect()` function (line 99–174) - `src/cleveragents/a2a/server_config.py` — `ServerConnectionConfig` model has `auth_token_ref: str | None = None` but this field is unused in the connect command ### Steps to Reproduce 1. Run `agents server connect https://agents.example.com` 2. Run `agents config get server.token` 3. Observe: `server.token` is not set — no token was persisted ### Impact Any user who configures server mode via `agents server connect` will have no authentication token, making all server-mode A2A operations fail. The spec explicitly states `server.token` is **required** when `server.url` is set. ### Suggested Fix Add a `--token` option to `server_connect`: ```python token: Annotated[ str | None, typer.Option("--token", "-t", help="Authentication token for server mode"), ] = None, ``` And persist it: ```python if token: svc.set_value("server.token", token) ``` --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-uat-tester
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • MoSCoW: Should Have

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

Issue triaged by project owner: - **State**: Verified - **MoSCoW**: Should Have --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
freemo added this to the v3.7.0 milestone 2026-04-05 05:07:05 +00:00
Author
Owner

Closing as duplicate of #2153.

Both issues describe the same bug: agents server connect is missing the --token option for setting server.token. Issue #2153 is the established tracking issue (v3.7.0 milestone, Priority/High, State/Verified). Please track this work in #2153.


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

Closing as duplicate of #2153. Both issues describe the same bug: `agents server connect` is missing the `--token` option for setting `server.token`. Issue #2153 is the established tracking issue (v3.7.0 milestone, `Priority/High`, `State/Verified`). Please track this work in #2153. --- **Automated by CleverAgents Bot** Supervisor: Backlog Grooming | Agent: ca-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#2562
No description provided.