Investigate CLI Injection at Session Start · Entire

Is the Entire CLI injecting anything in the start of this session and if not, why? investigate.

Evidence:

1

"context_injection_decided": true

A trail ties together the context for a branch...

Why not:

  1. Entire does not inject on SessionStart for Pi.

    Pi injection is wired to TurnStart / before_agent_start, not session creation.

  2. The trail-context gate is false for this clone.

    emitContextInjection() only emits the payload if trailsEnabledForRepo(ctx) is true. That reads .git/entire/preferences.json, and this file has no trails_enabled value, so the function returns false. The code intentionally marks context_injection_decided before that check, so it fails closed and won’t retry/spam later.

  3. Also, the installed Pi extension is stale.

    .pi/extensions/entire/index.ts currently ignores hook stdout. The source template now parses {"inject_context": ...} and returns a hidden entire-context message, but the installed extension does not. So even if Entire emitted injection stdout, this installed extension would not apply it until refreshed.

Summary:

Entire tracked the session, but did not inject model context into this run. Refreshing the Pi hook extension (entire configure --agent pi / re-enable) and having trails_enabled cached true would be required for that injection path to work.


Additional Actions

Note: working tree now has one generated config change:

M .pi/extensions/entire/index.ts

You may need to start a new Pi session for the updated extension file to be loaded.


Refresh Requirements

No, not every agent.
You only need to refresh agents whose repo-local generated integration code must learn how to consume the injection.

Also: injection is once per session and gated by trails_enabled. Future sessions should work now. Existing sessions that already recorded context_injection_decided: true won’t retry unless that flag is cleared.

The text you pasted:

A trail ties together the context for a branch...

is exactly the injection payload, so it looks like the refreshed Pi path is now working.


Pull Requests Created

Note: I used a separate ../entire.io-pi-update worktree so the existing dirty ../entire.io checkout was left untouched.

Commit Details

[9ea2071Update Pi extension for context injection

Entire-Checkpoint: ee09419b55ce+40/-5](/content/gh/entireio/cli/commit/9ea20713ad3c762e1ac2954fc2601c34682b34ce/index.html)