crewAI icon indicating copy to clipboard operation
crewAI copied to clipboard

[BUG] log-tasks-outputs never shows the actual task output

Open Velmet44 opened this issue 1 month ago • 1 comments

Description

crewai log-tasks-outputs in lib/cli/src/crewai_cli/cli.py:428-431 prints Description: with the task's expected_output and never prints the actual output, even though load_task_outputs() returns it (lib/cli/src/crewai_cli/task_outputs.py:45-56).

Steps to Reproduce

  1. Run a crew with kickoff() so task outputs are stored
  2. Run crewai log-tasks-outputs
  3. The listing shows the expected output text but not the actual result

Expected behavior

Each task shows its actual output in addition to the expected output, so the command fulfills its Retrieve your latest crew.kickoff() task outputs help text.

Screenshots/Code snippets

for index, task in enumerate(tasks, 1):
    click.echo(f"Task {index}: {task['task_id']}")
    click.echo(f"Description: {task['expected_output']}")
    click.echo("------")

Operating System

Windows 11

Python Version

3.12

crewAI Version

main @ 19d4154

crewAI Tools Version

N/A

Virtual Environment

Venv

Evidence

Local repro with load_task_outputs mocked to return expected_output: EXP, output: REAL: CLI prints Description: EXP, REAL never appears.

Possible Solution

Print Expected output: plus an Output: line from task['output']. Display-only, 1-2 lines.

Additional context

I'm working on this, PR to follow.

llm-generated: yes - drafted with AI assistance, verified locally.

Velmet44 avatar Oct 07 '26 15:10 Velmet44

Done in #7936 - now prints both Expected output and Output lines. Verified with mocked outputs and cli tests.

Velmet44 avatar Oct 07 '26 15:10 Velmet44