Documentation Reference / Session variables

Site

Docs Reference

Session variables

Exported by gantry runtime env

gantry runtime env --mission <file> prints these for eval, and --json returns them as an object. scripts/gxt-runtime-env.sh sources the same set; with no argument it uses GANTRY_MISSION or the pinned mission.

VariableValue
GANTRY_REPO_ROOTThe repository root
GANTRY_MISSION_FILEThe mission file
GANTRY_MSN_IDThe mission id
GANTRY_SKILL_KEYThe mission’s skill
GANTRY_TMVC_ROOTS_ABSOLUTEEffective edit roots, absolute paths, one per line (GXT_TMVC_ROOTS before 4.0; the plain name was already taken by the next row)
GANTRY_TMVC_ROOTSThe same roots, repository-relative and space-separated, for harnesses such as pi
GANTRY_FORBIDDEN_ZONESEffective forbidden zones, absolute paths, one per line
GANTRY_ALLOWED_IMPORTSThe contract’s allowed imports, one per line
GANTRY_BANNED_IMPORTSThe effective banned imports, one per line
GANTRY_EXECUTOR_LOGThe path of EXECUTOR_LOG.md
GANTRY_LAST_ERROR_FILEWhere runtime exec writes its last machine-readable error

gantry runtime env --aider also writes .gitagent/tmp/aider-tmvc-scope.md for Aider (Other agents).

Before 4.0 these were GXT_* names (GXT_REPO_ROOT, GXT_MISSION_FILE, …); 4.0 uses one prefix. GXT_* stays the error-code prefix.

Set by you

VariablePurpose
GANTRY_PLANNER_EMAILSComma-separated Git author emails allowed to legislate. gantry planner set records one
GANTRY_MISSIONThe mission for gxt-runtime-env.sh when no argument is given
GANTRY_AUDIENCEexecutor, planner or verifier; the same as the global --audience
GANTRY_TMVC_GUARD_STRICT1 makes the pre-commit scope check block instead of warn
GANTRY_MSN_SCAN_DEPTHHow many commits verify scans for the Planner commit (default 200)
GANTRY_BYPASS_SECRETThe break-glass secret, matched against .gitagent/foreman/BYPASS.sha256 (Break-glass)

Set by the cage

The session cage sets GANTRY_CAGE_SESSION=1 for the command it runs, and passes its temporary push guard through GIT_CONFIG_* variables (Session cage).