Repository navigation
chore - add codex resource context injection - #195
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
MANTRA_RESOURCES=injectnow adds resource observations to Codex model context. The formerdisplayvalue is removed without an alias. Explicitly configured hooks inject startup guidance and fresh observations on UserPromptSubmit/PostToolUse; other events collect passively. PreToolUse stays passive to avoid two observation blocks per tool call. Mantra is bumped to 0.10.0.The separate harness commit adds
--codex-version(default remains 0.147.0) and opt-in--codex-trust-hooks, with tests for version selection, isolation and canonical workspace trust. Documentation warns that trusted repository hooks run outside Codex’s sandbox and records observed token-count lag.Validation
npm test: 724 tests across 24 suites passed; Mantra 77 and scripts 104 passed.Contract and limits
The context output shape and event support were verified against the official hooks docs and Codex 0.161.0 schema. Hook trust and outside-sandbox execution were checked against the versioned configuration loader and command runner.
This remains an opt-in pilot: injected text has an input cost, no behavioral benefit has been established, and transcript-derived counts can lag or become unknown. Live verification is specific to Codex 0.161.0 on macOS. Historical research/review records remain unchanged.