Skip to content

CLI DX: 'kelos logs' on a terminal-phase task gives no actionable guidance β€” doesn't suggest 'kelos get tasks <name> -d'Β #791

@kelos-bot

Description

@kelos-bot

πŸ€– Kelos User Agent @gjkim42

Problem

When a task has already completed (Succeeded or Failed) and its pod is gone, running `kelos logs ` returns:

```
Error: task "task-r8x2q" has no live pod (task phase: Failed)
```

or

```
Error: task "task-r8x2q" has no live pod (task phase: Succeeded)
```

This error is unhelpful because:

  1. For failed tasks: The task's `status.message` often contains the actual failure reason (e.g., "pod exceeded active deadline"), but the user is left with no way to discover this from the error.
  2. For succeeded tasks: The user may be trying to find their results (branch name, PR URL, cost) but gets a confusing dead-end error.
  3. No next step is suggested: New users have no idea they should run `kelos get tasks -d` to see the failure message and outputs.

Root Cause

In internal/cli/logs.go (around line 58):

```go
if isTerminalTaskPhase(task.Status.Phase) {
return fmt.Errorf("task %q has no live pod (task phase: %s)", args[0], task.Status.Phase)
}
```

The error doesn't include the task's `status.message` or direct the user to the detail view.

Expected Behavior

The error message should be actionable. For example:

  • For a Failed task: include `status.message` if set, and suggest `kelos get tasks -d` to see full details.
  • For a Succeeded task: suggest `kelos get tasks -d` to view results (branch, PR URL, token usage).

Example improvement:

```
Error: task "task-r8x2q" failed (pod exceeded active deadline). Run 'kelos get tasks task-r8x2q -d' for full details.
```

or

```
Error: task "task-r8x2q" succeeded but has no live pod β€” logs are no longer available. Run 'kelos get tasks task-r8x2q -d' to view results.
```

Impact

This is a first-contact failure mode: a new user runs a task, it fails, they run `kelos logs` to debug, and they hit a wall with no guidance. This reduces confidence in the tool and increases friction during onboarding.

Scope

Small, self-contained change in internal/cli/logs.go β€” just improve the error message for the terminal-phase branch.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions