UAT: agents session tell uses stub actor dispatch — LLM is never invoked, response is always a hardcoded echo #4141

Open
opened 2026-04-06 10:43:00 +00:00 by freemo · 0 comments
Owner

Metadata

  • Branch: fix/session-tell-real-actor-dispatch
  • Commit Message: fix(session): wire real actor dispatch in agents session tell
  • Milestone: (none — backlog)
  • Parent Epic: #3374 (CLI/UX Epic)

Bug Report

What Was Tested

The agents session tell command — the primary user interaction point for sending messages to an actor and receiving LLM-generated responses.

Expected Behavior (from spec)

Per docs/specification.md §Session:

A persistent conversation thread tied to an orchestrator actor. Maintains message history across plans and serves as the user's natural-language interface.

The agents session tell --session <ID> <PROMPT> command should:

  1. Append the user message to the session
  2. Invoke the bound actor (LLM) with the conversation history
  3. Return the LLM-generated response
  4. Append the assistant response to the session

Actual Behavior

The tell() command in src/cleveragents/cli/commands/session.py uses a hardcoded stub response instead of invoking the actor:

@app.command()
def tell(prompt, session_id, actor=None, stream=False):
    """Send a message to a session.

    Appends a user message and generates an assistant response. For M3, the
    actor execution is stubbed — the assistant echoes an acknowledgement.
    """
    # ...
    # Stub actor execution: generate simple assistant response
    assistant_content = (
        f"Acknowledged: {prompt[:100]}"
        if not actor
        else f"[{actor}] Acknowledged: {prompt[:100]}"
    )
    service.append_message(
        session_id=session_id,
        role=MessageRole.ASSISTANT,
        content=assistant_content,
    )

The response is always "Acknowledged: <first 100 chars of prompt>" — the LLM is never called.

Impact

  • The primary user interaction command (agents session tell) does not actually invoke any LLM
  • Users receive a hardcoded echo instead of an AI-generated response
  • The session feature is effectively non-functional for its core purpose
  • The --actor flag has no effect on the response quality

Code Location

  • src/cleveragents/cli/commands/session.pytell() function
  • Comment in code: "For M3, the actor execution is stubbed — the assistant echoes an acknowledgement"

Steps to Reproduce

agents session create --actor openai/gpt-4
# Note the session ID
agents session tell --session <SESSION_ID> "What is the capital of France?"
# Expected: LLM response about Paris
# Actual: "Acknowledged: What is the capital of France?"

Subtasks

  • Wire tell() to invoke the actor registry and dispatch to the bound LLM
  • Use LLMActorsService or equivalent to run the actor with the session's message history
  • Handle streaming mode (--stream) by streaming the LLM response token by token
  • Handle the case where no actor is bound to the session
  • Add integration test verifying real LLM dispatch (with mock provider)

Definition of Done

  • agents session tell --session <ID> <PROMPT> invokes the bound actor's LLM
  • The response is the LLM-generated text, not a hardcoded echo
  • --stream mode streams the response in real-time
  • Session message history is correctly maintained across multiple tell calls
  • All nox stages pass
  • Coverage >= 97%

Backlog note: This issue was discovered during autonomous UAT testing.
The stub was intentionally introduced for M3 milestone. The real actor
dispatch needs to be wired for the session feature to be functional.

Backlog note: This issue was discovered during autonomous operation
on milestone M3. It does not block milestone completion and has been
placed in the backlog for human review and future milestone assignment.


Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: ca-new-issue-creator

## Metadata - **Branch**: `fix/session-tell-real-actor-dispatch` - **Commit Message**: `fix(session): wire real actor dispatch in agents session tell` - **Milestone**: _(none — backlog)_ - **Parent Epic**: #3374 (CLI/UX Epic) ## Bug Report ### What Was Tested The `agents session tell` command — the primary user interaction point for sending messages to an actor and receiving LLM-generated responses. ### Expected Behavior (from spec) Per `docs/specification.md` §Session: > A persistent conversation thread tied to an orchestrator actor. Maintains message history across plans and serves as the user's natural-language interface. The `agents session tell --session <ID> <PROMPT>` command should: 1. Append the user message to the session 2. Invoke the bound actor (LLM) with the conversation history 3. Return the LLM-generated response 4. Append the assistant response to the session ### Actual Behavior The `tell()` command in `src/cleveragents/cli/commands/session.py` uses a hardcoded stub response instead of invoking the actor: ```python @app.command() def tell(prompt, session_id, actor=None, stream=False): """Send a message to a session. Appends a user message and generates an assistant response. For M3, the actor execution is stubbed — the assistant echoes an acknowledgement. """ # ... # Stub actor execution: generate simple assistant response assistant_content = ( f"Acknowledged: {prompt[:100]}" if not actor else f"[{actor}] Acknowledged: {prompt[:100]}" ) service.append_message( session_id=session_id, role=MessageRole.ASSISTANT, content=assistant_content, ) ``` The response is always `"Acknowledged: <first 100 chars of prompt>"` — the LLM is never called. ### Impact - The primary user interaction command (`agents session tell`) does not actually invoke any LLM - Users receive a hardcoded echo instead of an AI-generated response - The session feature is effectively non-functional for its core purpose - The `--actor` flag has no effect on the response quality ### Code Location - `src/cleveragents/cli/commands/session.py` — `tell()` function - Comment in code: "For M3, the actor execution is stubbed — the assistant echoes an acknowledgement" ### Steps to Reproduce ```bash agents session create --actor openai/gpt-4 # Note the session ID agents session tell --session <SESSION_ID> "What is the capital of France?" # Expected: LLM response about Paris # Actual: "Acknowledged: What is the capital of France?" ``` ## Subtasks - [ ] Wire `tell()` to invoke the actor registry and dispatch to the bound LLM - [ ] Use `LLMActorsService` or equivalent to run the actor with the session's message history - [ ] Handle streaming mode (`--stream`) by streaming the LLM response token by token - [ ] Handle the case where no actor is bound to the session - [ ] Add integration test verifying real LLM dispatch (with mock provider) ## Definition of Done - [ ] `agents session tell --session <ID> <PROMPT>` invokes the bound actor's LLM - [ ] The response is the LLM-generated text, not a hardcoded echo - [ ] `--stream` mode streams the response in real-time - [ ] Session message history is correctly maintained across multiple `tell` calls - [ ] All nox stages pass - [ ] Coverage >= 97% > **Backlog note:** This issue was discovered during autonomous UAT testing. > The stub was intentionally introduced for M3 milestone. The real actor > dispatch needs to be wired for the session feature to be functional. > > **Backlog note:** This issue was discovered during autonomous operation > on milestone M3. It does not block milestone completion and has been > placed in the backlog for human review and future milestone assignment. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-new-issue-creator
freemo added this to the v3.2.0 milestone 2026-04-06 18:06:54 +00:00
freemo removed this from the v3.2.0 milestone 2026-04-06 20:41:33 +00:00
HAL9000 added this to the v3.5.0 milestone 2026-04-09 03:10:39 +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#4141
No description provided.