Skip to content

/inspect slash command — interactive structured overview of all active configuration, instructions, tools, and environment #1789

@berrat

Description

@berrat

Describe the feature or problem you'd like to solve

Understanding the full active configuration of a Copilot CLI session currently requires manually cross-referencing multiple files and locations: config.json, mcp.json, lsp-config.json, copilot-instructions.md, workspace files, and environment variables. There is no single command that surfaces everything in one place, in a readable and navigable format. This makes it difficult to audit what the agent has loaded, verify that a tool or instruction is active, diagnose misconfiguration, or hand off a session setup to another developer.

Proposed solution

Introduce a /inspect slash command that opens a structured, interactive alt-screen report of the entire active configuration, grouped into clearly labelled sections. Each section is independently collapsible, and individual rows are selectable — allowing the user to act on any entry directly.

Report structure:

/inspect — Session Configuration

  ▼ Custom Instructions
      Global     ~/.copilot/copilot-instructions.md               ✔ loaded  (1,240 tokens)
      Workspace  ~/repos/myapp/.github/copilot-instructions.md    ✔ loaded  (340 tokens)

  ▼ MCP Servers
      playwright  stdio  C:\nvm4w\nodejs\playwright-mcp            ✔ running   12 tools
      memory      stdio  mcp-server-memory                        ✔ running    3 tools
      git         stdio  uvx mcp-server-git                       ✔ running    9 tools

  ▼ Built-in Tools
      powershell  shell execution                                  ✔ enabled
      grep        file content search                              ✔ enabled
      glob        file pattern matching                            ✔ enabled
      view        file / directory viewer                          ✔ enabled
      lsp         language server protocol                         ✔ enabled  (5 servers)

  ▼ Sub-agent Types
      explore          claude-haiku-4.5     ✔ available
      task             claude-haiku-4.5     ✔ available
      general-purpose  claude-sonnet-4.5    ✔ available
      code-review      claude-sonnet-4.5    ✔ available

  ▼ LSP Servers
      typescript  typescript-language-server --stdio               ✔ running
      python      pyright-langserver --stdio                       ✔ running
      csharp      csharp-ls --stdio                                ✔ running
      html        vscode-html-language-server --stdio              ✔ running
      css         vscode-css-language-server --stdio               ✔ running

  ▼ Config & Settings  (~/.copilot/config.json)
      reasoning_effort   high
      banner             never
      trusted_folders    1 folder(s)

  ▼ Environment Variables (CLI-relevant)
      EDITOR        code --wait
      GITHUB_TOKEN  ✔ set  (redacted)
      NO_COLOR      not set

Interaction model:

  • ↑ / ↓ — navigate between rows
  • Enter on a row — open a contextual action menu:
    • For instructions: "Explain this file's contents", "Test if the agent is following this instruction"
    • For MCP servers: "List available tools", "Test connectivity", "Disable this server"
    • For tools: "Explain what this tool does", "Run a test invocation"
    • For config keys: "Explain this setting", "Change value"
    • For env vars: "Explain how this affects the CLI"
  • c on any section header — collapse / expand that group
  • Ctrl+C on a row — copy the path or value to clipboard
  • Escape — close the report and return to session

Example prompts or workflows

  1. User adds a new MCP server but the agent isn't using it — runs /inspect, navigates to MCP Servers, sees ✖ failed to start, selects it and chooses "Show error".
  2. User wants to verify which custom instruction files are loaded and how many tokens each consumes — opens /inspect, expands Custom Instructions, sees both files with token counts.
  3. New team member inherits a repo — runs /inspect to understand the full configuration before sending their first prompt.
  4. User selects a built-in tool row and chooses "Explain what this tool does" — the agent responds inline with a plain-language description without leaving the session.
  5. User selects an env var row and chooses "Explain how this affects the CLI" — immediately understands its purpose without consulting documentation.

Additional context

  • OS: Windows 11 Pro (Build 26200 / 24H2)
  • Shell: PowerShell 7.5.4
  • Copilot CLI: 0.0.420 (win32-x64)
  • /diagnose already exists for connectivity checks — /inspect is the complementary configuration audit, focused on what is loaded and active rather than what is reachable.
  • /lsp already exists to view LSP server status — /inspect subsumes and extends this into a unified view.
  • The alt-screen interactive pattern (navigation, selection, action menus) is already established in the TUI for checkpoints and MCP management.
  • Sub-agent model names in the example above reflect the bundled defaults from the agent definition files shipped with 0.0.420. The panel should show whatever model is actually active or overridden at runtime.
  • Sensitive values (tokens, secrets) must always be redacted in the display; only their presence (✔ set) or absence should be shown.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions