Investigate CLI Injection at Session Start

Is the Entire CLI injecting anything in the start of this session and if not, why? investigate.
No — I don’t see evidence that Entire injected model-facing context at the start of this Pi session.
Evidence:
-
Current session:
019edc3a-aed0-7e9f-977d-e77ce53ecc1f, agent typePi. -
Entire hooks did fire (
session-start,turn-start) per.entire/logs/entire.log. -
Session state shows Entire made the once-per-session decision:
.git/entire-sessions/019edc3a-aed0-7e9f-977d-e77ce53ecc1f.json -
But the Pi transcript has no
entire-context,inject_context, or the expected injected text:A trail ties together the context for a branch...
Why not:
-
Entire does not inject on
SessionStartfor Pi.
Pi injection is wired toTurnStart/before_agent_start, not session creation. -
The trail-context gate is false for this clone.
emitContextInjection()only emits the payload iftrailsEnabledForRepo(ctx)is true. That reads.git/entire/preferences.json, and this file has notrails_enabledvalue, so the function returns false. The code intentionally markscontext_injection_decidedbefore that check, so it fails closed and won’t retry/spam later. -
Also, the installed Pi extension is stale.
.pi/extensions/entire/index.tscurrently ignores hook stdout. The source template now parses{"inject_context": ...}and returns a hiddenentire-contextmessage, but the installed extension does not. So even if Entire emitted injection stdout, this installed extension would not apply it until refreshed.
So: 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.
Done.
- Checked out latest
main:92154228dc32 - Fast-forwarded from
origin/main - Rebuilt/installed
entireinto~/.local/bin - Refreshed the Pi extension so it now parses
inject_context - Cached
trails_enabled: true - Reset this session’s failed
context_injection_decidedflag
Note: working tree now has one generated config change:
You may need to start a new Pi session for the updated extension file to be loaded.
No, not every agent.
You only need to refresh agents whose repo-local generated integration code must learn how to consume the injection.
- Pi: yes, needed refresh. Its
.pi/extensions/entire/index.tshad stale code that ignored hook stdout. - OpenCode: likely same class — generated plugin may need refresh if installed before injection support.
- Claude Code / Codex / Gemini: usually no refresh needed if hooks are already installed. Their hooks call the
entirebinary; updating the binary is enough because injection is emitted byentire hooks .... - Agents without
ContextInjectorsupport: won’t get this model-context injection regardless.
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.
Created both PRs:
- CLI: https://github.com/entireio/cli/pull/1469
- entire.io: https://github.com/entirehq/entire.io/pull/2449
Note: I used a separate ../entire.io-pi-update worktree so the existing dirty ../entire.io checkout was left untouched.