Claude Code plugin
The Claude Code plugin is distributed through a marketplace hosted in the Copilot API repository.1
Add the marketplace
Inside Claude Code, run:This registers the Copilot API marketplace catalog with Claude Code.
2
Install the plugin
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:
OpenCode plugin
The OpenCode plugin is a JavaScript file included in the Copilot API repository at.opencode/plugins/subagent-marker.js.
1
Copy the plugin file
Clone or download the Copilot API repository, then copy the plugin to your OpenCode plugins directory:If you prefer not to clone the repository, create the file manually at
~/.config/opencode/plugins/subagent-marker.js with the plugin content from the repository.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.