UAT: agents session tell is stubbed — echoes acknowledgement instead of invoking the bound actor #2583

Open
opened 2026-04-03 19:00:09 +00:00 by freemo · 1 comment
Owner

Metadata

  • Branch: fix/cli-session-tell-actor-invocation
  • Commit Message: fix(cli): implement real actor invocation in agents session tell
  • Milestone: v3.6.0
  • Parent Epic: #945

Background and Context

During UAT testing, a code analysis of cleveragents.cli.commands.session (the tell command handler) revealed that the agents session tell <PROMPT> --session <SESSION_ID> command is implemented as a stub. Instead of invoking the session's bound actor to generate a real AI response, it simply echoes a hardcoded acknowledgement string back to the user. The docstring in the implementation explicitly admits this: "For M3, the actor execution is stubbed — the assistant echoes an acknowledgement."

This means the primary purpose of the agents session tell command — enabling users to have conversations with AI actors via the CLI — is entirely non-functional.

Current Behavior

The implementation generates a hardcoded stub response instead of invoking the actor:

# Stub actor execution: generate simple assistant response
assistant_content = (
    f"Acknowledged: {prompt[:100]}"
    if not actor
    else f"[{actor}] Acknowledged: {prompt[:100]}"
)

Steps to reproduce:

  1. Create a session: agents session create --actor openai/gpt-4
  2. Send a message: agents session tell --session <ID> "What is 2+2?"
  3. Observe: response is "Acknowledged: What is 2+2?" instead of an actual AI response

Code location: cleveragents.cli.commands.sessiontell command handler, stub block at the actor execution step (lines 692, 709–719 at time of discovery).

Expected Behavior

Per the specification, agents session tell <PROMPT> --session <SESSION_ID> should:

  1. Append the user message to the session
  2. Invoke the session's bound actor (or the actor specified via --actor) to generate a real response
  3. Append the actor's response to the session
  4. Display the response (or stream it if --stream is used)

Acceptance Criteria

  • agents session tell invokes the session's bound actor and returns a real, non-stubbed response
  • The --actor override flag correctly substitutes a different actor for the invocation
  • The --stream flag streams the response in real-time
  • Actor-not-found and invocation errors are handled gracefully with clear, actionable error messages
  • The session history correctly records both the user message and the actor's response

Supporting Information

  • Code location at time of discovery: cleveragents.cli.commands.sessiontell command handler, stub block (lines 692, 709–719)
  • Suggested fix: Replace the stub with actual actor invocation using the A2A facade or ReactiveCleverAgentsApp:
    • Resolve the actor from the session's actor_name (or --actor override)
    • Invoke the actor with the prompt
    • Append the real response to the session
    • Support streaming via --stream
  • Impact: The agents session tell command is non-functional for its primary purpose. Users cannot use the CLI to have conversations with actors via sessions.

Subtasks

  • Remove stub implementation from session tell command
  • Implement real actor invocation via A2A facade or ReactiveCleverAgentsApp
  • Support --stream flag for real-time response streaming
  • Handle actor-not-found and invocation errors gracefully
  • Add Behave unit tests with mocked actor
  • Add Robot Framework integration tests
  • Update PR and close this issue

Definition of Done

  • agents session tell invokes the bound actor and returns a real response
  • --stream flag streams the response in real-time
  • Error cases (no actor, actor unavailable) are handled with clear messages
  • All subtasks above are completed and checked off
  • A Git commit is created where the first line of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation
  • The commit is pushed to the remote on the branch matching the Branch in Metadata exactly
  • The commit is submitted as a pull request to master, reviewed, and merged before this issue is marked done
  • All nox sessions pass
  • Coverage >= 97%

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

## Metadata - **Branch**: `fix/cli-session-tell-actor-invocation` - **Commit Message**: `fix(cli): implement real actor invocation in agents session tell` - **Milestone**: v3.6.0 - **Parent Epic**: #945 ## Background and Context During UAT testing, a code analysis of `cleveragents.cli.commands.session` (the `tell` command handler) revealed that the `agents session tell <PROMPT> --session <SESSION_ID>` command is implemented as a stub. Instead of invoking the session's bound actor to generate a real AI response, it simply echoes a hardcoded acknowledgement string back to the user. The docstring in the implementation explicitly admits this: *"For M3, the actor execution is stubbed — the assistant echoes an acknowledgement."* This means the primary purpose of the `agents session tell` command — enabling users to have conversations with AI actors via the CLI — is entirely non-functional. ## Current Behavior The implementation generates a hardcoded stub response instead of invoking the actor: ```python # Stub actor execution: generate simple assistant response assistant_content = ( f"Acknowledged: {prompt[:100]}" if not actor else f"[{actor}] Acknowledged: {prompt[:100]}" ) ``` **Steps to reproduce:** 1. Create a session: `agents session create --actor openai/gpt-4` 2. Send a message: `agents session tell --session <ID> "What is 2+2?"` 3. Observe: response is `"Acknowledged: What is 2+2?"` instead of an actual AI response **Code location:** `cleveragents.cli.commands.session` — `tell` command handler, stub block at the actor execution step (lines 692, 709–719 at time of discovery). ## Expected Behavior Per the specification, `agents session tell <PROMPT> --session <SESSION_ID>` should: 1. Append the user message to the session 2. Invoke the session's bound actor (or the actor specified via `--actor`) to generate a real response 3. Append the actor's response to the session 4. Display the response (or stream it if `--stream` is used) ## Acceptance Criteria - `agents session tell` invokes the session's bound actor and returns a real, non-stubbed response - The `--actor` override flag correctly substitutes a different actor for the invocation - The `--stream` flag streams the response in real-time - Actor-not-found and invocation errors are handled gracefully with clear, actionable error messages - The session history correctly records both the user message and the actor's response ## Supporting Information - **Code location at time of discovery**: `cleveragents.cli.commands.session` — `tell` command handler, stub block (lines 692, 709–719) - **Suggested fix**: Replace the stub with actual actor invocation using the A2A facade or `ReactiveCleverAgentsApp`: - Resolve the actor from the session's `actor_name` (or `--actor` override) - Invoke the actor with the prompt - Append the real response to the session - Support streaming via `--stream` - **Impact**: The `agents session tell` command is non-functional for its primary purpose. Users cannot use the CLI to have conversations with actors via sessions. ## Subtasks - [ ] Remove stub implementation from `session tell` command - [ ] Implement real actor invocation via A2A facade or ReactiveCleverAgentsApp - [ ] Support `--stream` flag for real-time response streaming - [ ] Handle actor-not-found and invocation errors gracefully - [ ] Add Behave unit tests with mocked actor - [ ] Add Robot Framework integration tests - [ ] Update PR and close this issue ## Definition of Done - [ ] `agents session tell` invokes the bound actor and returns a real response - [ ] `--stream` flag streams the response in real-time - [ ] Error cases (no actor, actor unavailable) are handled with clear messages - [ ] All subtasks above are completed and checked off - [ ] A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation - [ ] The commit is pushed to the remote on the branch matching the **Branch** in Metadata exactly - [ ] The commit is submitted as a **pull request** to `master`, reviewed, and **merged** before this issue is marked done - [ ] All nox sessions pass - [ ] Coverage >= 97% --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-uat-tester
freemo added this to the v3.6.0 milestone 2026-04-03 19:01:02 +00:00
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
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#2583
No description provided.