Skip to content

bug: Errors mentioning 'replace' when using update-task with the --research flag #1689

@cjwdev1

Description

@cjwdev1

Description

When I go to use the update-task command, such as

task-master update-task --id=36 --research --prompt="..."

I get the following errors and the operation does not complete:

[INFO] Loading prompt template with variant: research, appendMode: false, useResearch: true
[ERROR] Failed to load prompt update-task: Cannot read properties of undefined (reading 'replace')
[ERROR] Failed to load prompt template: Cannot read properties of undefined (reading 'replace')
[ERROR] Error updating task: Failed to load prompt template: Cannot read properties of undefined (reading 'replace')
Error: Failed to load prompt template: Cannot read properties of undefined (reading 'replace')

However when I execute the same command the only difference being no --research flag, there the task completes without any issues.

Steps to Reproduce

  1. Issue an update-task command with the --research flag
  2. Observe the resulting errors

Expected Behavior

I expect it to complete the command without errors, and to update the task while using the --research context

Actual Behavior

errors and fails

Screenshots or Logs

Image

Environment

  • Task Master version: 0.43.1
  • Node.js version: 24.14.1
  • Operating system: Windows 11 Business
  • IDE (if applicable): Cursor, Powershell terminal

Additional Context

Happy to provide any additional info, I just don't know what info would be relevant! Please reach out.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:cliCLI functionalityarea:task-managementCore task management featuresbugSomething isn't workingmedium-priorityImportant but not urgent

    Projects

    Status

    Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions