Claude Code plugin
The Claude Code plugin is distributed through a marketplace hosted in the Copilot API repository.Add the marketplace
Inside Claude Code, run:This registers the Copilot API marketplace catalog with Claude Code.
What the plugin does
- Injects a subagent marker at the
SubagentStartlifecycle event so the proxy can identify subagent traffic. - Registers a
UserPromptSubmithook that returns{"continue": true}.
Plugin environment variables
You can control the plugin’s behavior with these environment variables, set in your.claude/settings.json env block or in your shell:
| Variable | Effect |
|---|---|
CLAUDE_PLUGIN_ENABLE_QUESTION_RULES=1 | Automatically injects question-tool reminders at session start. This is equivalent to adding the reminders manually in CLAUDE.md — see CLAUDE.md / AGENTS.md recommended content below. |
CLAUDE_PLUGIN_ENABLE_NO_BACKGROUND_AGENTS_RULE=1 | Adds a reminder discouraging agent hooks that set run_in_background: true. |
OpenCode plugin
The OpenCode plugin is a JavaScript file included in the Copilot API repository at.opencode/plugins/subagent-marker.js.
What the plugin does
- Tracks sub-sessions created by subagents.
- Prepends a subagent marker as a system reminder to subagent chat messages.
- Sets a session ID header for session tracking.
session.created, session.deleted, chat.message, and chat.headers.
CLAUDE.md / AGENTS.md recommended content
Adding question-tool reminders to your project’sCLAUDE.md (for Claude Code) or AGENTS.md (for OpenCode and Codex) helps the agent check in with you before closing a task instead of finishing silently.
CLAUDE.md or AGENTS.md
If you set
CLAUDE_PLUGIN_ENABLE_QUESTION_RULES=1 in your Claude Code environment, the plugin injects these reminders automatically at session start. You do not need to add them to CLAUDE.md in that case — but it does not hurt to have both.