Skip to content

Enable rubber duck and /rubber-duck command#318662

Merged
digitarald merged 6 commits into
mainfrom
digitarald/rubber-duck-agent
May 30, 2026
Merged

Enable rubber duck and /rubber-duck command#318662
digitarald merged 6 commits into
mainfrom
digitarald/rubber-duck-agent

Conversation

@digitarald
Copy link
Copy Markdown
Contributor

@digitarald digitarald commented May 28, 2026

Summary

Enables the Rubber Duck critic subagent in the Agent Host — an independent reviewer that uses a complementary model family (Claude↔GPT at the same tier) to catch bugs, logic errors, and design flaws before they ship.

https://docs.github.com/en/copilot/concepts/agents/copilot-cli/rubber-duck

…duck command

Add chat.agentHost.rubberDuck.enabled setting (default-on for insiders/dev,
hidden from stable) that gates the RUBBER_DUCK_AGENT feature flag. The flag
flows from the VS Code setting through the agent host starters into the CLI
subprocess environment.

Add /rubber-duck slash command that invokes the critic subagent for an
independent review of the current approach. The command is only visible when
the feature is enabled.
Copilot AI review requested due to automatic review settings May 28, 2026 01:15
@digitarald digitarald requested a review from DonJayamanne May 28, 2026 01:16
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR wires up the “Rubber Duck” critic subagent in the Agent Host by introducing a dedicated VS Code setting that controls propagation of a RUBBER_DUCK_AGENT env var into the agent-host process, and adds a /rubber-duck slash command surfaced via Copilot CLI completions and handled in the Copilot agent session.

Changes:

  • Register chat.agentHost.rubberDuck.enabled (default enabled for non-stable builds) and plumb it through both Node and Electron agent-host starters via RUBBER_DUCK_AGENT.
  • Add /rubber-duck to Copilot CLI slash-command parsing and completion, with completion visibility gated by RUBBER_DUCK_AGENT.
  • Add tests covering parsing, completion behavior, and env var gating.
Show a summary per file
File Description
src/vs/platform/agentHost/test/node/copilotSlashCommandCompletionProvider.test.ts Adds tests for /rubber-duck parse + completion + env-gated visibility
src/vs/platform/agentHost/node/nodeAgentHostStarter.ts Reads new setting and sets RUBBER_DUCK_AGENT in agent-host env
src/vs/platform/agentHost/node/copilot/copilotSlashCommandCompletionProvider.ts Adds /rubber-duck command + env-gated completion visibility
src/vs/platform/agentHost/node/copilot/copilotAgentSession.ts Dispatches /rubber-duck by injecting a critic-invocation prompt
src/vs/platform/agentHost/node/copilot/copilotAgent.ts Removes hardcoded RUBBER_DUCK_AGENT enablement
src/vs/platform/agentHost/electron-main/electronAgentHostStarter.ts Adds the same setting→env wiring for the Electron utility-process starter
src/vs/platform/agentHost/common/agentService.ts Introduces AgentHostRubberDuckEnabledSettingId constant
src/vs/platform/agentHost/common/agentHostStarter.config.contribution.ts Registers the new configuration setting (non-stable only)

Copilot's findings

  • Files reviewed: 8/8 changed files
  • Comments generated: 2

Comment thread src/vs/platform/agentHost/node/copilot/copilotAgentSession.ts Outdated
Comment thread src/vs/platform/agentHost/test/node/copilotSlashCommandCompletionProvider.test.ts Outdated
@digitarald digitarald changed the title Enable rubber duck critic subagent with setting and /rubber-duck command Enable rubber duck and /rubber-duck command May 28, 2026
@digitarald digitarald marked this pull request as ready for review May 28, 2026 19:54
digitarald and others added 3 commits May 29, 2026 08:18
…k-agent

# Conflicts:
#	src/vs/platform/agentHost/node/copilot/copilotSlashCommandCompletionProvider.ts
#	src/vs/platform/agentHost/test/common/agentHostFileSystemProvider.test.ts
#	src/vs/platform/agentHost/test/node/copilotSlashCommandCompletionProvider.test.ts
@digitarald digitarald requested a review from connor4312 May 29, 2026 20:13
@digitarald digitarald merged commit a1cc9c0 into main May 30, 2026
25 checks passed
@digitarald digitarald deleted the digitarald/rubber-duck-agent branch May 30, 2026 00:51
@vs-code-engineering vs-code-engineering Bot added this to the 1.123.0 milestone May 30, 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.

3 participants