Dev container hygiene
This guide explains how APEX keeps GitHub Copilot Chat context lean in the dev container, and what contributors can do locally when extension-contributed chat customizations inflate every turn.
Extensions can contribute skills, agents, prompts, and chat participants. Inspect what the client actually loads before attributing context size to an extension. The product and Accelerator container configurations can differ by revision.
Repository mitigations
Section titled “Repository mitigations”User-scope discovery is disabled
Section titled “User-scope discovery is disabled”The workspace settings disable user-profile customization discovery for this repository:
chat.instructionsFilesLocationsdisables~/.copilot/instructionsand~/.claude/rules.chat.agentFilesLocationsdisables~/.copilot/agentsand~/.claude/agents.chat.agentSkillsLocationsdisables~/.copilot/skillsand~/.claude/skills.chat.useClaudeMdFileis set tofalsebecause this repository usesAGENTS.md.
The same settings are mirrored into the dev container VS Code customizations. They are workspace-scoped, so personal prompts and instructions still work in other repositories.
The dev container extension list is curated
Section titled “The dev container extension list is curated”The dev container extension list excludes extensions that contribute heavy
Copilot Chat customizations without serving the APEX workflow. The policy is
recorded next to the customizations.vscode.extensions array in
.devcontainer/devcontainer.json.
Unwanted extension recommendations warn contributors
Section titled “Unwanted extension recommendations warn contributors”The workspace uses .vscode/extensions.json unwantedRecommendations to
flag extensions that commonly add large chat customization payloads:
ms-azuretools.vscode-azure-github-copilot: duplicates APEX’s end-to-end agent set.ms-windows-ai-studio: AI Toolkit is not used by the APEX flow.teamsdevapp.vscode-ai-foundry: AI Foundry is not used by the APEX flow.
These entries express unwanted recommendations. They are not proof that an extension is disabled or uninstalled. Inspect the active local and remote extension lists in VS Code.
CI rejects denylisted extensions
Section titled “CI rejects denylisted extensions”npm run validate:extension-bloat rejects changes that add denylisted
extensions to the dev container extension list. The denylist lives in
tools/scripts/validate-extension-bloat.mjs.
Borderline extensions can remain as unwantedRecommendations only. That keeps
the warning visible without blocking contributors who deliberately need a tool
for work outside the APEX flow.
Contributor cleanup
Section titled “Contributor cleanup”Acknowledge the VS Code dialog
Section titled “Acknowledge the VS Code dialog”Review the extension’s purpose and active scope before disabling or uninstalling it. Do not assume dismissing a recommendation changes the active extension set.
Remove extensions globally when appropriate
Section titled “Remove extensions globally when appropriate”To remove flagged extensions from every workspace on your machine, run these commands from your host VS Code environment:
code --uninstall-extension ms-azuretools.vscode-azure-github-copilotcode --uninstall-extension ms-windows-ai-studiocode --uninstall-extension teamsdevapp.vscode-ai-foundryReinstall an extension later with code --install-extension <id> if you start
using it in another workspace.
Trim user-profile prompt files
Section titled “Trim user-profile prompt files”Personal *.instructions.md and *.prompt.md files in your VS Code user
profile load globally by default. The workspace suppresses them for APEX, but
they can still add context in other repositories.
Common locations:
- Windows:
%APPDATA%\Code\User\prompts\ - macOS:
~/Library/Application Support/Code/User/prompts/ - Linux:
~/.config/Code/User/prompts/
Inspect what loaded
Section titled “Inspect what loaded”Right-click in the Copilot Chat view and select Diagnostics. The diagnostics view lists every active agent, skill, instruction, prompt, and hook, including where each one came from.
An older source pin or client listing may still show historical hooks. The owner
retired APEX .github/hooks/ runtime hooks in the October 18 migration; do not
restore them to match that listing. Do not disable Git Lefthook, pre-commit
security checks, CI, MCP servers, or other tooling as a blanket cleanup. Verify
the scope of each component. See the retirement record.
Use this when you need to confirm that workspace mitigations are active or when a new extension appears to be adding unexpected context.
Adding dev container extensions
Section titled “Adding dev container extensions”Before adding an extension to .devcontainer/devcontainer.json, inspect the
extension package.json for these contributes keys:
chatSkillschatAgentschatPromptFileschatParticipants
If the extension contributes chat customizations that overlap with APEX’s agent
and skill model, prefer a per-developer install. If the extension should be
blocked for everyone, update the denylist in
tools/scripts/validate-extension-bloat.mjs and document the reason.
Parallel chat retry race
Section titled “Parallel chat retry race”If a session appears to repeat a request, retain the relevant timestamps, request IDs, and logs. Similar spans alone do not establish duplicate billing, discarded responses, or the cause of a retry. Report observations separately from hypotheses.
When filing an upstream issue, use the Copilot Chat feedback issue template in
.github/ISSUE_TEMPLATE/copilot-chat-feedback.md and include the relevant saved
telemetry details.
Related
Section titled “Related”- Debug Log Export. bundle Copilot debug logs for review
- Session Debugging. recover workflow state and resume safely
- Validation & Linting. run repository validation checks