# npm test outside the subagent-child harness

Command run from `/home/code/.pi/agent/git/github.com/wassname/pi-goals`:

```sh
env -u PI_SUBAGENT_CHILD -u PI_SUBAGENT_EXTENSION_BINDINGS -u PI_SUBAGENT_PARENT_SESSION -u PI_SUBAGENTS_PI_CODING_AGENT_PACKAGE_ROOT npm test
```

The cleared variables were the complete `PI_SUBAGENT_*` set inherited by this worker. `PI_SUBAGENT_CHILD=1` makes `isSupervisorProcess()` false in `src/index.ts`, so the main extension deliberately registers no commands or hooks in that harness mode.

Exact output:

```text

> @wassname2/pi-goals@0.2.2 test
> vitest run


 RUN  v4.1.9 /home/code/.pi/agent/git/github.com/wassname/pi-goals


 Test Files  9 passed (9)
      Tests  43 passed (43)
   Start at  15:57:04
   Duration  1.27s (transform 407ms, setup 0ms, import 1.41s, tests 1.63s, environment 1ms)


__EXIT_STATUS__=0
```

The earlier callback-registration failures and RPC timeout therefore came from the intentional child-process extension gate, not a source test failure.

-- PI[gpt-5.6]
