How a script, hook or CLI can tell it was started by each harness, and which session started it. Children inherit these variables, so treat them as hints that an agent is involved, not as proof that no person is watching.
Detecting the harness
| Question | Antigravity CLI |
|---|---|
| The variable to check | Partly Configured status-line scripts receive product: antigravity and a CLI version in JSON on stdin. A general inherited process environment marker remains unverified. |
| Which processes get it | Partly The CLI passes the status-line payload to its configured command on stdin. Propagation to ordinary shell tools, hooks or MCP processes remains unverified. |
| Which session started the command | Status-line JSON includes conversation_id and its session_id alias, conversation_title once assigned, and transcript_path. The reported file may not exist yet. |
Relying on it
| Question | Antigravity CLI |
|---|---|
| Telling the agent's commands from yours | Not documented The documented payload cannot establish which variables distinguish agent tool shells from a person’s shell. |
| Signs that nobody will answer a prompt | Not documented Print mode and its output flags are documented. An inherited noninteractive environment hint remains unverified. |
| Removing or overriding it | AGY_CLI_OSC7501 can turn terminal state reporting off or force it on. AGY_CLI_OSC7501_MESSAGES=brief limits reporting to status without prompt details. These inputs configure terminal reporting. |