Harness Notes

Environment detection

Updated 2026-11-22,

On this page

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

QuestionAntigravity 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

QuestionAntigravity 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.

Notes and sources

Antigravity CLI, 3 sources
The variable to check, 1
Which processes get it, 1
Which session started the command, 1
Telling the agent's commands from yours, 1
Signs that nobody will answer a prompt, 1
Removing or overriding it, 1