bug: Expand Command Destroys Tagged Task Structure #477

Closed
opened 2025-10-14 15:57:13 -06:00 by navan · 0 comments
Owner

Originally created by @mm-parthy on 6/18/2025

Bug Report: Expand Command Destroys Tagged Task Structure

Description

When using the task-master expand command with the --tag parameter, the command completely destroys the tagged task structure and converts the tasks.json file from the proper tagged format to an old flat format, resulting in total data loss of tag organization and metadata.

Steps to Reproduce

  1. Have a tasks.json file with proper tagged structure containing multiple tags (e.g., "master", "test-tag", "feature-web-interface")
  2. Run the expand command with tag parameter:
    task-master expand --id=2 --prompt="Divide into: CLI command structure extension, server lifecycle management implementation, port configuration and validation, and PID-based process management for stop functionality." --num=4 --tag=feature-web-interface
    
  3. Check the tasks.json file after command execution

Expected Behavior

  • The command should operate only within the specified feature-web-interface tag context
  • The tagged structure should be preserved with all tags and metadata intact
  • Only task ID 2 within the feature-web-interface tag should be modified with new subtasks
  • Subtasks should have proper hierarchical IDs (2.1, 2.2, 2.3, 2.4)
  • All other tags and tasks should remain untouched

Actual Behavior

  • The entire tagged structure is destroyed and converted to old flat format
  • All tag metadata is permanently lost
  • The file structure changes from {"master": {...}, "test-tag": {...}, "feature-web-interface": {...}} to {"tasks": [...]}
  • All tasks from all tags are flattened into a single array
  • Generated subtasks have incorrect IDs (1, 2, 3, 4 instead of 2.1, 2.2, 2.3, 2.4)
  • The resulting JSON file is malformed and truncated

Screenshots or Logs

Before: Properly structured tagged format with 3 tags and metadata
After: Corrupted flat format with no tag structure and malformed JSON

Environment

  • Task Master version: 17.0
  • Node.js version: 22.16
  • Operating system: MacOS
  • Command executed via CLI and MCP

Additional Context

This represents a critical data corruption bug that results in permanent loss of task organization. The --tag parameter appears to be completely ignored during the expand operation.

*Originally created by @mm-parthy on 6/18/2025* # Bug Report: Expand Command Destroys Tagged Task Structure ### Description When using the `task-master expand` command with the `--tag` parameter, the command completely destroys the tagged task structure and converts the tasks.json file from the proper tagged format to an old flat format, resulting in total data loss of tag organization and metadata. ### Steps to Reproduce 1. Have a tasks.json file with proper tagged structure containing multiple tags (e.g., "master", "test-tag", "feature-web-interface") 2. Run the expand command with tag parameter: ```bash task-master expand --id=2 --prompt="Divide into: CLI command structure extension, server lifecycle management implementation, port configuration and validation, and PID-based process management for stop functionality." --num=4 --tag=feature-web-interface ``` 3. Check the tasks.json file after command execution ### Expected Behavior - The command should operate only within the specified `feature-web-interface` tag context - The tagged structure should be preserved with all tags and metadata intact - Only task ID 2 within the `feature-web-interface` tag should be modified with new subtasks - Subtasks should have proper hierarchical IDs (2.1, 2.2, 2.3, 2.4) - All other tags and tasks should remain untouched ### Actual Behavior - The entire tagged structure is destroyed and converted to old flat format - All tag metadata is permanently lost - The file structure changes from `{"master": {...}, "test-tag": {...}, "feature-web-interface": {...}}` to `{"tasks": [...]}` - All tasks from all tags are flattened into a single array - Generated subtasks have incorrect IDs (1, 2, 3, 4 instead of 2.1, 2.2, 2.3, 2.4) - The resulting JSON file is malformed and truncated ### Screenshots or Logs **Before:** Properly structured tagged format with 3 tags and metadata **After:** Corrupted flat format with no tag structure and malformed JSON ### Environment - Task Master version: 17.0 - Node.js version: 22.16 - Operating system: MacOS - Command executed via CLI and MCP ### Additional Context This represents a critical data corruption bug that results in permanent loss of task organization. The `--tag` parameter appears to be completely ignored during the expand operation.
Sign in to join this conversation.
No labels
area:ai-models
area:ai-models
area:ai-models
area:ai-models
area:ai-models
area:ai-models
area:ai-models
area:ai-models
area:ai-models
area:ai-models
area:ai-models
area:ai-models
area:cli
area:cli
area:cli
area:cli
area:cli
area:cli
area:cli
area:cli
area:cli
area:cli
area:cli
area:cli
area:cli
area:cli
area:installation
area:installation
area:installation
area:installation
area:installation
area:mcp
area:mcp
area:mcp
area:mcp
area:mcp
area:mcp
area:mcp
area:mcp
area:mcp
area:mcp
area:mcp
area:mcp
area:mcp
area:mcp
area:mcp
area:mcp
area:mcp
area:task-management
area:task-management
area:task-management
area:task-management
area:task-management
area:task-management
area:task-management
area:task-management
area:task-management
area:task-management
area:task-management
area:task-management
area:task-management
area:task-management
area:task-management
area:task-management
area:task-management
area:vscode-extension
area:vscode-extension
area:vscode-extension
area:vscode-extension
area:vscode-extension
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
documentation
documentation
documentation
documentation
documentation
documentation
documentation
documentation
documentation
documentation
documentation
documentation
documentation
documentation
documentation
documentation
documentation
duplicate
duplicate
duplicate
duplicate
duplicate
duplicate
duplicate
duplicate
duplicate
duplicate
duplicate
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
help wanted
help wanted
help wanted
help wanted
help wanted
high-priority
high-priority
high-priority
high-priority
high-priority
high-priority
high-priority
high-priority
high-priority
high-priority
high-priority
high-priority
high-priority
integration request
integration request
integration request
integration request
invalid
invalid
invalid
invalid
invalid
invalid
invalid
invalid
invalid
invalid
invalid
invalid
invalid
invalid
low-priority
low-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
provider:anthropic
provider:anthropic
provider:claude-code
provider:claude-code
provider:claude-code
provider:claude-code
provider:claude-code
provider:claude-code
provider:claude-code
provider:claude-code
provider:claude-code
provider:claude-code
provider:claude-code
provider:gemini-cli
provider:openai
provider:perplexity
question
question
question
question
question
question
question
question
question
question
question
question
question
question
refactor
refactor
wontfix
wontfix
wontfix
wontfix
wontfix
wontfix
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.

Dependencies

No dependencies set.

Reference: github/claude-task-master#477
No description provided.