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 | pichecked at 1.4.0 |
|---|---|
| The variable to check | |
| Which processes get it | |
| Which session started the command |
|
Relying on it
| Question | pichecked at 1.4.0 |
|---|---|
| Telling the agent's commands from yours | Partly Use |
| Signs that nobody will answer a prompt | Not documented Not documented. Pi's environment reference lists no terminal, pager or CI settings for agent commands. |
| Removing or overriding it | A custom shell tool's |