Detection rules
editEach LLMContextKind is detected from one or more environment variables. A tool is detected when any of its variables matches:
| LLMContextKind | Variables | Match when |
|---|---|---|
| ClaudeCode | CLAUDECODE, CLAUDE_CODE_ENTRYPOINT | Set |
| Cursor | CURSOR_EDITOR, CURSOR_AI | Set |
| Gemini | GEMINI_CLI | True |
| GitHubCopilot | GITHUB_COPILOT_CLI_MODE | True |
| GitHubCopilot | GH_COPILOT_WORKING_DIRECTORY, COPILOT_CLI, COPILOT_AGENT | Set |
| Codex | CODEX_CLI, CODEX_SANDBOX | Set |
Aider | OR_APP_NAME | Equal to Aider |
| Plandex | OR_APP_NAME | Equal to plandex |
| Amp | AMP_CURRENT_THREAD_ID | Set |
| QwenCode | QWEN_CODE | Set |
| Droid | DROID_CLI | True |
| OpenCode | OPENCODE_AI | Set |
| KimiCLI | KIMI_CLI | True |
OpenHands | OR_APP_NAME | Equal to OpenHands |
| Goose | GOOSE_TERMINAL | Set |
| Cline | CLINE_TASK_ID | Set |
| RooCode | ROO_CODE_TASK_ID | Set |
| Windsurf | WINDSURF_SESSION | Set |
| GenericAgent | AGENT_CLI | True |
- Set: the variable exists and its value is not empty. Its value does not matter.
- True: the value is
1, ortrue,yesoron, ignoring case.0,false,no,off, an empty value and any other value do not match. - Equal to: the value is the given text, ignoring case.
Variables that are not used
Some tools also set variables that a developer can set in any shell, such as configuration variables or the variables of an editor's terminal. They would detect a person as an agent, so they are ignored. For instance, AMP_HOME, a configuration variable, does not detect Amp: only AMP_CURRENT_THREAD_ID, which Amp sets in the commands it runs, does.
Flag your own agent
AGENT_CLI is not tied to a tool. Set it to 1 or true in the environment of the commands your own agent or automation runs, and they are detected as LLMContextKind.GenericAgent.