Skip to content

Environment variables

The framework is env-driven so a fresh user can clone + run without editing source. Every variable listed here is honoured by the agent_runner package, install.sh, deploy.sh, or the rendered scheduler units.

For the local config template, see .alfredrc.example.

VarUsed byDefaultNotes
GH_ORGagent_runner._full_repo (every gh helper)(none: raises)Bare repo slugs (backend) get resolved to <GH_ORG>/<slug>.
VarUsed byDefaultNotes
OPERATOR_NAMEagent promptsblankOptional human-readable name substituted via load_prompt(..., extra_vars=...).
OPERATOR_EMAILagent prompts(blank)Same.
OPERATOR_GH_HANDLEsome prompts(blank)Used when distinct from GH_ORG.

ALFRED_HOME is the Alfred runtime root.

VarUsed byDefault
ALFRED_HOMEeverything$HOME/.alfred
WORKSPACE_ROOTparent of repo checkouts; combined with WORKSPACE_SUBDIR by agent_runner.WORKSPACE$HOME/code
WORKSPACE_SUBDIRsubdirectory under WORKSPACE_ROOT; set to an empty string for repos directly under WORKSPACE_ROOTproduct
CLAUDE_BINagent_runner.claude_invokeclaude (PATH)
CLAUDE_CONFIG_DIRclaude auth profile selectionSet by alfred claude for scheduled agents
CODEX_BINagent_runner.codex_invokecodex (PATH)
CODEX_MODELoptional model override for codex exec(Codex default)
CODEX_SANDBOXcodex exec --sandboxread-only
CODEX_APPROVAL_POLICYcodex exec -c approval_policy=...never
VarUsed byDefault
ALFRED_<CODENAME>_ENGINEper-agent engine choicerunner default
ALFRED_ENGINEfleet-wide engine override(none)
ALFRED_REVIEW_ENGINElegacy review-agent override(none)
ALFRED_<CODENAME>_MAX_TURNSoptional per-agent Claude turn caprunner default
ALFRED_<CODENAME>_CODEX_SANDBOXper-agent Codex sandboxCODEX_SANDBOX
ALFRED_<CODENAME>_CODEX_WRITEshortcut for workspace-write0

Engine values are claude, codex, or hybrid; both is accepted as a legacy alias for hybrid. bin/alfred engine status/set persists per-agent engine choices under $ALFRED_HOME/state/engines/<codename>.

VarUsed byDefault
ALFRED_SHIPPED_SUMMARY_REPOSalfred shipped / alfred-shipped-summary.py watched repo list(none)
ALFRED_SHIPPED_SUMMARY_QUERY_LIMITper-window GitHub query limit1000
VarUsed byDefault
BATMAN_SCAN_REPOSbin/batman.py repo scan scope for agent:large-feature issues(none, no-op)
BATMAN_ROLLOUT_ORDERalfred-init.py and plan parsing defaultsbackend,frontend,mobile,agents,data-acquisition
AGENT_CODENAME_CROSS_REPO_COORDINATORalfred-init.py codename mappingbatman
BATMAN_PARENT_REPObin/batman.py parent-issue lifecycle path(none)
BATMAN_AUTO_EXECUTElib/batman.py plan execution mode0
BATMAN_PICKERlib/batman.py parent issue selectionoldest
BATMAN_BUNDLE_SLUG_PREFIXlib/batman.py bundle slug rendering(blank)
BATMAN_APPROVAL_TIMEOUT_Slib/batman.py Slack approval wait86400
BATMAN_REPORT_FEEDBACK_TIMEOUT_Slib/batman.py post-report Slack follow-up capture60
BATMAN_SLACK_CHANNELlib/batman.py plan and report channel(blank, falls back to Slack home channel)

Batman is opt-in. The newer BATMAN_PARENT_REPO path reads parent issues, waits for approval when required, files child agent:implement issues, and reports status. The legacy BATMAN_SCAN_REPOS path scans configured repos, groups agent:bundle:<slug> siblings, posts a rollout plan, and stops before child issue filing.

VarUsed byDefault
ALFRED_DISABLE_CLAUDE_AUTH_REPAIRdisables automatic Claude auth refresh attempts0
CLAUDE_CONFIG_DIRClaude Code auth profile selection$HOME/.claude for primary
VarUsed byDefault
SLACK_WEBHOOK_URLslack_post (env-var path, highest priority)(none)
SLACK_WEBHOOK_SECRET_IDslack_post (AWS path)alfred/slack-webhook
SLACK_WEBHOOK_SECRET_REGIONslack_post (AWS path)us-east-1
SLACK_BOT_TOKENBlock Kit / thread helpers(none)
SLACK_BOT_TOKEN_SECRET_IDbot token AWS pathalfred/slack-bot-token
SLACK_BOT_TOKEN_SECRET_REGIONbot token AWS regionus-east-1
SLACK_APP_TOKENSocket Mode token for the optional planning listener(none)
ALFRED_SLACK_APP_TOKENAlternate Socket Mode token env var(none)
ALFRED_OPERATOR_SLACK_USER_IDOperator user id for reactions and trusted listener input(required for approvals/listener)
ALFRED_TRUSTED_SLACK_USER_IDSExtra users allowed to refine plans and draftsapprover only
ALFRED_SLACK_BOT_USER_IDBot user id; listener ignores its own messages(none)
SLACK_HOME_CHANNELdefault bot channelalfred
BATMAN_APPROVAL_CHANNELlegacy alias for SLACK_HOME_CHANNEL(none)

Resolution order: env -> 30-day disk cache at $ALFRED_HOME/state/slack-webhook.cache -> AWS Secrets Manager. First hit wins.

VarUsed byDefault
ALFRED_HUNTRESS_AWS_PROFILE, ALFRED_GORDON_AWS_PROFILErole runners that touch AWS(none: AWS checks disabled or use default chain)
AWS_PROFILEset by role runners around owned aws ... calls(none)
AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN, AWS_SECURITY_TOKENstripped before aws ... calls in agents that need pure-profile auth(admin SSO leakage)
VarUsed byDefault
ALFRED_DOCTORevery agent’s doctor_mode() check0

Set to 1 and any agent runner will emit [<NAME>-DOCTOR-OK] and exit 0 without side effects.

VarUsed byDefault
ALFRED_SPEND_RETENTION_DAYSagent-cleanup.py (in consumer fleets)90
ALFRED_TRANSCRIPT_RETENTION_DAYSsame30
ALFRED_EVENTS_RETENTION_DAYSsame30
ALFRED_CLAIM_MAX_AGE_HOURSstale-claim sweep4
VarUsed byDefault
ALFRED_NONINTERACTIVEinstall.sh (use defaults for every prompt)(interactive)
ALFRED_SKIP_NPMskip Claude Code install(run)
ALFRED_SKIP_BREWskip brew install (macOS lane)(run)
VarUsed byDefault
LABEL_STATE_SWEEP_REPOSexamples/bin/label_state.py sweep-claims (default repo set)(must pass --repo)
LABEL_STATE_BINpre-push hook(resolves via PATH then $ALFRED_HOME/bin/)
LABEL_STATE_SKIP_DEDUP_CHECKpre-push hook(enforce)
VarUsed byDefault
ALFRED_OS_PUBLISH_PAGES.github/workflows/site.yml deploy gate(unset: build only)
ALFRED_OS_SITE_URLsite/astro.config.mjshttps://alfred.luminik.io
ALFRED_OS_SITE_BASEsame/

Override these to deploy under a custom domain (e.g. ALFRED_OS_SITE_URL=https://alfred-os.dev + ALFRED_OS_SITE_BASE=/).

lib/agent_runner/paths.py is the canonical path contract. Every other config file (install.sh, _template.plist, agents.conf) renders into the same env-var shape.