Skip to content

Duplicate leaf task names in included taskfiles break tree grouping #228

Description

@joeblew999

Problem

When using Taskfile includes with namespaced taskfiles, tasks that share the same leaf name across different included files (e.g. install, health, shell) are hoisted to the root level in the VS Code tree view instead of staying nested under their namespace.

Expected behavior

duckdb:install and restish:install should each appear under their respective namespace folders (duckdb and restish) in the tree view — the same way task --list-all shows them as fully qualified names on the CLI.

Actual behavior

When multiple included taskfiles contain a task with the same name (e.g. both duckdb.yml and restish.yml have an install: task), those tasks appear at the root level of the tree view to disambiguate, breaking the namespace grouping.

Workaround

Prefix every task name inside included files to ensure global uniqueness (e.g. duckdb-install: instead of install: inside duckdb.yml). This works but produces redundant fully-qualified names like duckdb:duckdb-install.

Reproduction

Taskfile.yml:

version: "3"

includes:
  duckdb:
    taskfile: taskfiles/duckdb.yml
  restish:
    taskfile: taskfiles/restish.yml

tasks:
  default:
    desc: Show tasks
    cmds:
      - task --list

taskfiles/duckdb.yml:

version: "3"
tasks:
  install:
    desc: Install DuckDB
    cmds:
      - echo "installing duckdb"

taskfiles/restish.yml:

version: "3"
tasks:
  install:
    desc: Install restish
    cmds:
      - echo "installing restish"

Both install tasks appear at root instead of under duckdb and restish folders.

Environment

  • VS Code extension: task.vscode-task
  • Task CLI: v3.x
  • OS: macOS

Activity

  1. joeblew999 commented on Jan 29, 2026

    @joeblew999
    Author

    Update: Confirmed this is purely a VS Code extension issue, not a Task CLI issue.

    Using the reproduction case above, task --list-all correctly shows:

    * default:           Root default
    * aaa:install:       AAA install
    * bbb:install:       BBB install
    

    Both install tasks are properly namespaced under aaa: and bbb: — no hoisting, no ambiguity. The Task CLI handles duplicate leaf names across namespaces without any issues.

    The tree view in the VS Code extension is the only place where these get incorrectly hoisted to the root level.

  2. pd93 commented on Feb 14, 2026

    @pd93
    Member

    Fixed in #214 which will release soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions