Skip to content

Task History Shows Blank/Empty Task Names #4410

@kiwina

Description

@kiwina

App Version: v3.19.5

API Provider: Not Applicable / Other

Model Used: N/A

🔁 Steps to Reproduce

  1. Setup:

    • OS: Windows/macOS/Linux (any OS)
    • Extension version: v3.19.5 or earlier
    • VS Code with Roo Code extension installed
  2. Exact actions to reproduce the issue:

    • Start a new task in Roo Code
    • Before the first message is fully processed or if the task creation fails:
      • Force close VS Code, OR
      • Kill the extension process, OR
      • Experience a crash during task initialization
    • Restart VS Code and open Roo Code
    • Check the task history panel
  3. Alternative reproduction path:

    • Create a task where the first message has empty or whitespace-only content
    • Complete or abandon the task
    • Check task history

💥 Outcome Summary

Expected task names to always show meaningful text in history, but got blank entries or empty task names appearing in the task history panel.

📄 Relevant Logs or Errors (Optional)

// The issue was in taskMetadata.ts where task names could be blank
// if the first message was empty or if the task crashed during initialization

// Before fix:
task: taskMessage.text || ""  // Could result in empty string

// After fix (implemented in our branch):
let taskName = taskMessage.text?.trim() || ""
if (!taskName) {
    taskName = `Task #${taskNumber} (Incomplete)`
}

📋 Additional Context

This bug affects user experience by:

  1. Making it difficult to identify tasks in the history
  2. Creating confusion about which tasks were actually completed
  3. Leaving "ghost" entries that provide no meaningful information

The root cause is in src/core/task-persistence/taskMetadata.ts where the task name extraction doesn't handle edge cases:

  • Empty or whitespace-only first messages
  • Tasks that crash before the first message is properly saved
  • Tasks with no messages at all

🔧 Proposed Solution

We've implemented a fix in the fix/disappearing-task branch that:

  1. Adds fallback logic for empty task names
  2. Handles the edge case where no messages exist
  3. Provides meaningful default names like "Task #X (Incomplete)" or "Task #X (No messages)"

The fix ensures task history always displays meaningful information to users, improving the overall user experience and debugging capability.

Metadata

Metadata

Assignees

Labels

Issue - In ProgressSomeone is actively working on this. Should link to a PR soon.bugSomething isn't working

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions