Skip to content

Statusline setup nudge leaks into VS Code Copilot (isCopilot misses CLAUDE_PLUGIN_ROOT) #528

Description

@wdw89

Statusline setup nudge leaks into VS Code Copilot (isCopilot misses CLAUDE_PLUGIN_ROOT)

Bug

ponytail-activate.js:45 guards the statusline nudge with !isCodex && !isCopilot. But ponytail-runtime.js:6 detects Copilot via:

const isCopilot = Boolean(process.env.COPILOT_PLUGIN_DATA);

VS Code Copilot never sets COPILOT_PLUGIN_DATA; it only injects CLAUDE_PLUGIN_ROOT (confirmed from a live SessionStart hook env on Windows, VS Code Copilot, ponytail 4.8.4). So isCopilot=false → ponytail assumes native Claude Code CLI → emits the STATUSLINE SETUP NEEDED nudge telling the user to edit ~/.claude/settings.json's statusLine — a key VS Code Copilot doesn't read. Pure noise.

Reproduce

  1. Install ponytail into ~/.vscode/agent-plugins/github.com/DietrichGebert/ponytail.
  2. Don't add a statusLine key to ~/.claude/settings.json.
  3. Start a new Copilot chat → SessionStart hook Output: ends with STATUSLINE SETUP NEEDED: ....

Suggested fix

Detect VS Code Copilot from CLAUDE_PLUGIN_ROOT as a fallback when COPILOT_PLUGIN_DATA is unset:

const isCopilot = Boolean(process.env.COPILOT_PLUGIN_DATA) ||
  (process.env.CLAUDE_PLUGIN_ROOT || '')
    .split(/[\\/]+/).includes('agent-plugins') &&
  (process.env.CLAUDE_PLUGIN_ROOT || '').toLowerCase().includes('.vscode');

Also guard stateDir — the isCopilot branch reads process.env.COPILOT_PLUGIN_DATA which is unset under VS Code, so fall back to getClaudeDir():

let stateDir = getClaudeDir();
if (isCodex) stateDir = process.env.PLUGIN_DATA;
if (process.env.COPILOT_PLUGIN_DATA) stateDir = process.env.COPILOT_PLUGIN_DATA;

Workaround

Add any statusLine entry to ~/.claude/settings.json. The check at ponytail-activate.js:51 only verifies presence, so a stub value silences the nudge (VS Code Copilot ignores the file).

Env

ponytail 4.8.4 · VS Code Copilot (agent-plugins install) · Windows 11

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions