fix(launcher): inherit HCOM_NOTES in the Codex bootstrap path#84
Merged
Conversation
The Codex-specific launch path hard-coded the bootstrap `notes` argument to an empty string, so a newly launched Codex session never received the global behavior notes that every other tool's launch path passes through. Sessions started via other tools read HCOM_NOTES and include a NOTES section; Codex was the lone exception and started without it. Extract a `build_codex_bootstrap` helper that reads HCOM_NOTES from the effective launch environment and feeds it to the shared `bootstrap::get_bootstrap` used by both production and tests. Behavior is unchanged when HCOM_NOTES is unset. Adds a unit test covering both cases: the NOTES section is present when HCOM_NOTES has a value, and behavior is unchanged when it is absent. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Session: 1422c55e-ec89-44cf-ad66-5e5538a19fb9 Producer: ai-session Tool: cc
…sport The existing tests only assert on build_codex_bootstrap's intermediate string. Add a test that runs the real chain through preprocess_codex_args, locates the -c developer_instructions= argument, TOML-decodes it, and asserts multiline notes with quotes, backslashes, and literal braces survive. Also add the HCOM_NOTES="" empty-value case, which is the documented way to clear notes and is distinct from a missing key.
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.
Problem
The Codex-specific launch path hard-coded the bootstrap
notesargument to an empty string, so a newly launched Codex session never received the global behavior notes (HCOM_NOTES) that every other tool's launch path passes through. Sessions started via other tools readHCOM_NOTESand include a NOTES section in their bootstrap; Codex was the lone exception and started without it.Fix
Extract a
build_codex_bootstraphelper that readsHCOM_NOTESfrom the effective launch environment and feeds it to the sharedbootstrap::get_bootstrapused by both production and tests. Behavior is unchanged whenHCOM_NOTESis unset — this only fills the gap where Codex diverged from the other tools.Tests
Adds a unit test covering both cases: the NOTES section is present when
HCOM_NOTEShas a value, and behavior is unchanged when it is absent.Verified locally with
cargo fmt --all -- --check,cargo clippy --all-targets --locked -- -D warnings, andcargo test --locked(all green).Only
src/launcher.rsis touched.🤖 Generated with Claude Code