@ Mentions and Agent Mode Context

Day 9 · Week 2 · Context — The Secret Sauce

Slack Message — copy & paste

🤖 Tip #9 — How you feed context to AI depends on the mode and tool. Agent mode auto-discovers; Ask/Plan mode needs @ mentions.

#9 VSCode Chat

How Each Tool Gets Context

  • VSCode ChatAsk/Plan mode (manual context)
    • @workspace — searches your codebase
    • @terminal — includes terminal output
    • @vscode — knows about editor settings and commands
    • Drag & drop files into chat
    • Select code → 'Add to Chat'
  • VSCode ChatAgent mode (auto-discovers) — the AI doesn't wait for you to feed context. It actively searches, reads files, runs searches, checks LSP diagnostics, even runs terminal commands. Just describe the task.
  • Copilot CLI context
    • #file:path/to/file.js to include a specific file
    • Drag & drop from file explorer
    • CLI auto-reads relevant files in agentic mode
  • Claude Codeautomatically discovers context via Read, Grep, Glob tools. CLAUDE.md provides persistent project context loaded into every session.
@file @workspace #runSubagent Agent Mode
#9 Context — The Secret Sauce

Context Power Moves

  1. 1 #runSubagentcreates a context-isolated sub-task within VSCode Chat. The subagent gets a fresh context, does its work, and returns results — similar to Claude Code's spawned agents.
  2. 2 In VSCode Agent mode, just describe what you want without any @ mentionswatch how the AI finds context on its own
  3. 3 Use #runSubagent for isolated research tasks that shouldn't pollute your main conversation context
  4. 4 In Copilot CLI, use #file:path to explicitly include files when the auto-discovery misses something
@file @workspace #runSubagent Agent Mode
Your screenshot here Optional — add a screenshot from your own workflow
KAI by Dragan Filipovic