Allow CLAUDE_CONFIG_DIR as a wrapper contract global

The wrapper guard permits each agent's per-account home export by name
(CODEX_HOME, MIMOCODE_HOME, OPENCODE_CONFIG_DIR); CLAUDE_CONFIG_DIR is the
same contract and joins them. Snapshots regenerated after verifying the only
content change is the Claude restore line.
This commit is contained in:
Merge Sim
2026-08-31 19:44:37 -07:00
committed by Merge Sim
parent 38e09105cf
commit 52ceb92a96
4 changed files with 7 additions and 0 deletions
@@ -136,6 +136,8 @@ __orca_deferred_init() {
# Why: Codex must keep using Orca's runtime CODEX_HOME after rc files.
[[ -n "${ORCA_CODEX_HOME:-}" ]] && export CODEX_HOME="${ORCA_CODEX_HOME}"
# Why: Claude must keep using Orca's runtime config directory after rc files.
[[ -n "${ORCA_CLAUDE_CONFIG_DIR:-}" ]] && export CLAUDE_CONFIG_DIR="${ORCA_CLAUDE_CONFIG_DIR}"
# Why: a typed alias expands inside the shell, after pane launch prep.
# Why unalias inside the substitution: an alias named codex makes command -v
# report the alias text, and the subshell leaves the user's own alias intact.
@@ -101,6 +101,8 @@ fi
# Why: Codex must keep using Orca's runtime CODEX_HOME after profile scripts.
[[ -n "${ORCA_CODEX_HOME:-}" ]] && export CODEX_HOME="${ORCA_CODEX_HOME}"
# Why: Claude must keep using Orca's runtime config directory after profile scripts.
[[ -n "${ORCA_CLAUDE_CONFIG_DIR:-}" ]] && export CLAUDE_CONFIG_DIR="${ORCA_CLAUDE_CONFIG_DIR}"
# Why: a typed alias expands inside the shell, after pane launch prep.
# Why unalias inside the substitution: an alias named codex makes command -v
# report the alias text, and the subshell leaves the user's own alias intact.
@@ -136,6 +136,8 @@ __orca_deferred_init() {
# Why: Codex must keep using Orca's runtime CODEX_HOME after rc files.
[[ -n "${ORCA_CODEX_HOME:-}" ]] && export CODEX_HOME="${ORCA_CODEX_HOME}"
# Why: Claude must keep using Orca's runtime config directory after rc files.
[[ -n "${ORCA_CLAUDE_CONFIG_DIR:-}" ]] && export CLAUDE_CONFIG_DIR="${ORCA_CLAUDE_CONFIG_DIR}"
# Why: a typed alias expands inside the shell, after pane launch prep.
# Why unalias inside the substitution: an alias named codex makes command -v
# report the alias text, and the subshell leaves the user's own alias intact.
@@ -67,6 +67,7 @@ async function expectWrapperFiles(transport: string, root: string): Promise<void
*/
const CONTRACT_GLOBALS = new Set([
'BUFFER',
'CLAUDE_CONFIG_DIR',
'CODEX_HOME',
'HISTFILE',
'MIMOCODE_HOME',