fix(codex): honor effective CODEX_HOME during launch - #115
Merged
Merged
Conversation
Owner
|
thanks |
orgoj
added a commit
to orgoj/hcom
that referenced
this pull request
Sep 13, 2026
… module) Upstream fabb309 brings the runner Node-precedence fix (aannoo#117), the grown CODEX_HOME resolution (aannoo#115), Ptyxis support (aannoo#113), the Windows nested PowerShell removal (aannoo#137) and the kimi modularisation (aannoo#106). Conflicts resolved in upstream's favour: - codex.rs / codex_preprocessing.rs: the fork's cherry-picked 080c78a used a thread-local CODEX_HOME override; upstream's explicit `*_at` threading replaces it, so the wrapper functions and the thread-local are dropped. - launcher.rs: upstream's case-insensitive effective-env helpers and the earlier canonical_dir are taken; the fork's per-instance system-prompt path stays and upstream's global gemini system-prompt block is dropped. - kimi: upstream's src/hooks/kimi/ module replaces the fork's kimi.rs (it already carries the fork's lifecycle and observation fixes); only the fork's nested-identity gate `hook_gate_check_for_tools` is re-applied. - terminal_presets: expected preset count raised to 30 for Ptyxis. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WDRs6TVA2uSBXG2TQacFRf
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.
Summary
config.toml,~/.hcom/env, and caller env overlaysCODEX_HOMEfor the writability preflight, hook installation/verification, hook trust scanning, and the Codex app-server probeProblem
When hcom runs inside a sandboxed parent Codex, a writable
CODEX_HOMEsupplied through~/.hcom/envis part of the child environment. The launch preflight and hook setup previously ran before that environment was built, so they still inspected the parent process's default~/.codexand rejected an otherwise valid launch withOperation not permitted.Verification
cargo fmt --all -- --checkcargo clippy --all-targets --locked -- -D warningscargo test --locked(2177unit tests and35integration/smoke tests passed; only opt-in real-tool/PTY tests were ignored)CODEX_HOME, bound its hooks, and delivered an hcom message back to the parent