Skip to content

fix(agents): rename .agent.md to .md for VS Code Copilot tool access#846

Merged
tmchow merged 6 commits into
EveryInc:mainfrom
brianpaden289:main
May 21, 2026
Merged

fix(agents): rename .agent.md to .md for VS Code Copilot tool access#846
tmchow merged 6 commits into
EveryInc:mainfrom
brianpaden289:main

Conversation

@brianpaden289
Copy link
Copy Markdown
Contributor

Problem

CE subagents have zero tool access when loaded as a VS Code Copilot plugin. Agents can't read workspace files, search, or execute commands — failing with ACCESS_FAILED No filesystem read tool is available in this session.

Root Cause

VS Code's plugin loader uses file extension to determine format:

  • .agent.mdCopilot format — expects tools: [read, search, execute] (VS Code canonical names)
  • .mdClaude format — maps tools: Read, Grep, Glob, Bash to VS Code equivalents automatically

CE agents declare Claude-style tools (Read, Grep, Glob, Bash, Write), but the .agent.md extension causes VS Code to parse them as Copilot format. Since those tool names don't match VS Code's canonical set, they are silently dropped — leaving agents with no tools.

Fix

Rename all 49 agent files from .agent.md to .md. This triggers Claude format detection, which correctly maps the declared tools to VS Code's canonical tool set.

The CE CLI parser (collectMarkdownFiles / deriveMarkdownStem) already handles both extensions, so this is backward-compatible with all existing conversion targets.

Verified

Tested ce-coherence-reviewer in VS Code Copilot — successfully read workspace files after the rename.

VS Code's plugin loader uses file extension to determine format:
- .agent.md -> Copilot format (expects tools: [read, search, execute])
- .md -> Claude format (maps tools: Read, Grep, Glob, Bash to VS Code equivalents)

CE agents use Claude-style tool declarations, so the .agent.md extension
caused VS Code to parse them as Copilot format, silently dropping all
unrecognized tool names and leaving agents with zero tool access.

Renaming to plain .md triggers Claude format detection, which correctly
maps the declared tools to VS Code's canonical tool set.
fix(agents): rename .agent.md to .md for VS Code Copilot tool access
@tmchow
Copy link
Copy Markdown
Collaborator

tmchow commented May 20, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 21d66c7442

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tests/legacy-cleanup.test.ts Outdated
tmchow added 3 commits May 20, 2026 14:27
…hecks

The rename from `.agent.md` to `.md` (this PR) left two test blocks filtering on
the old extension. They kept passing because they silently iterated zero agent
files:

- `tests/frontmatter.test.ts` -- the regex `^agents/[^/]+\.agent\.md$` no longer
  matched any agent, so the ce- prefix check and the NO_BASH_AGENTS Bash-tool
  check (issue EveryInc#832) ran on no inputs.
- `tests/skill-agent-ce-prefix.test.ts` -- `entry.name.endsWith(".agent.md")`
  filtered every agent out, so the entire "compound-engineering agent ce-
  prefix" describe block emitted zero tests.

Update both filters to `.md` so the assertions actually run against the renamed
files. After this change, ~99 agent-level assertions execute that were
previously no-ops, including the NO_BASH_AGENTS guard on ce-coherence-reviewer.
Two contributor-facing docs still told future authors to use the old extension
after this PR renamed every agent file:

- `plugins/compound-engineering/AGENTS.md` showed the directory layout as
  `ce-*.agent.md` and instructed "create `agents/ce-<name>.agent.md`" under
  "Adding Components". A new agent added by following this guide would land
  with the broken-on-VS-Code extension that this PR exists to fix.
- `docs/solutions/adding-converter-target-providers.md` claimed Copilot's
  extension is `.agent.md`. Update the entry to `.md` and inline the reason
  (VS Code parses `.agent.md` as Copilot format and drops Claude-style tools)
  so the next provider author understands why `.md` is the correct choice and
  doesn't "fix" it back.

No runtime behavior change.
…test

Addresses PR EveryInc#846 review comment (Codex P2):
EveryInc#846 (comment)

The original rename pass updated this test's fixture extension from
`.agent.md` to `.md`, which (a) duplicated the preceding "removes flat .md
agent files" test and (b) dropped the only unit-level coverage of the
`.agent.md` cleanup path. That path is still live: `getLegacyCopilotArtifacts`
emits `<name>.agent.md` candidates so `cleanupCopilot` can sweep stale flat
installs from the pre-rename era. A future regression in `.agent.md` handling
would have gone undetected at this layer.

Restore the fixture and `cleanupStaleAgents` extension argument to `.agent.md`,
rename the test to "(legacy Copilot extension)" so its purpose is unambiguous,
and add a comment explaining why the legacy extension is intentionally kept
under test even after the source rename. Plugin-description references stay on
`.md` since those source files were renamed.
@tmchow tmchow merged commit 796bea7 into EveryInc:main May 21, 2026
2 checks passed
@github-actions github-actions Bot mentioned this pull request May 21, 2026
LLMpsycho pushed a commit to LLMpsycho/compound-engineering-plugin that referenced this pull request May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants