Skip to content

fix: AI generated .copilot-tracking files produce broken relative paths flooding VS Code Problems tab #698

@ChrisRisner

Description

@ChrisRisner

Summary

Files generated by hve-core agents (plan .instructions.md files and subagent research .md files) contain incorrect relative file references that flood the VS Code Problems tab with dozens of "File not found" errors. This creates significant noise and makes it difficult to find real issues.

Environment

  • VS Code: Insiders
  • hve-core extension: ise-hve-essentials.hve-core-2.3.10
  • OS: macOS

Two Distinct Root Causes

1. Broken #file: directives in generated plan .instructions.md files

Plan files generated in .copilot-tracking/plans/<date>/*.instructions.md contain #file: directives with incorrect relative paths to hve-core instruction files. For example:

### Standards References

* #file:../../.github/instructions/markdown.instructions.md — Markdown formatting conventions
* #file:../../.github/instructions/writing-style.instructions.md — Writing style conventions
* #file:../../.github/copilot-instructions.md — Repository conventions

Problem: From a file at .copilot-tracking/plans/2026-02-19/some-plan.instructions.md, the path ../../.github/instructions/markdown.instructions.md resolves to .copilot-tracking/.github/instructions/markdown.instructions.md — not the repo root. Even if the traversal went to the repo root, the .github/instructions/ directory doesn't exist in consumer repositories; these files live inside the hve-core extension directory.

Affected files (in one workspace session alone):

  • ai-commit-messages-plan.instructions.md (2 errors)
  • aliases-issue-plan.instructions.md (1 error)
  • copy-script-issue67-plan.instructions.md (1 error)
  • dark-theme-slide-reorder-plan.instructions.md (1 error)
  • new-customer-linting-issue71-plan.instructions.md (2 errors)
  • powerpoint-generation-plan.instructions.md (2 errors)
  • readme-revision-issue68-plan.instructions.md (3 errors)
  • 2026-02-18-security-review-followup-plan.instructions.md (3 errors)

2. Broken relative markdown links in generated subagent research files

Research files generated at .copilot-tracking/research/subagents/<date>/*.md use relative markdown links that assume the file is at the repo root:

**Source:** [README.md](README.md) (Lines 1–10), [.github/copilot-instructions.md](.github/copilot-instructions.md)

Problem: These relative links resolve from the file's own directory (.copilot-tracking/research/subagents/2026-02-19/), so README.md resolves to .copilot-tracking/research/subagents/2026-02-19/README.md which doesn't exist. This produces 20+ "File does not exist" errors from a single research file.

Affected file example: vertex-content-analysis-research.md generates errors for references to README.md, CONTRIBUTING.md, docs/goals.md, docs/onboarding.md, docs/snippets.md, .github/copilot-instructions.md, .pre-commit-config.yaml, setup.sh, scripts/validation/schemas/schema-mapping.json, and security-plan-outputs/security-plan-vertex.md.

Impact

A typical workspace accumulates 50-60+ Problems tab entries from these broken references, making it impractical to use the Problems tab for its intended purpose — finding real code issues.

Suggested Fixes

For #file: directives in plan files

  • Option A: Remove #file: references to hve-core instruction files from generated plans entirely. The instructions are already loaded via applyTo globs and don't need to be re-referenced.
  • Option B: If the references serve documentation purposes, convert them to plain-text comments (not #file: directives) so VS Code doesn't try to resolve them.
  • Option C: Use workspace-root-relative paths with the correct traversal depth based on the plan file's nesting level.

For relative links in research files

  • Option A: Use workspace-root-relative paths (e.g., [README.md](../../../../README.md)) with correct traversal depth.
  • Option B: Use plain-text references instead of markdown links for source attribution in research output.

Reproduction Steps

  1. Install hve-core extension v2.3.10
  2. Use any hve-core agent that generates plan .instructions.md files or subagent research files (e.g., RPI workflow, task-planner)
  3. Open the VS Code Problems tab
  4. Observe dozens of "File not found" errors from .copilot-tracking/ files

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions