Repository navigation
refactor(archon): wire CLAUDE_BIN_PATH for live-workflow agent work orders (#2217) #2359
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,132 @@ | ||
| # Archon env wiring (Issue #2217, 2026-08-03) | ||
|
|
||
| > Cold-read spec for the archon live-workflow env wiring. If you are a | ||
| > fresh local model picking this work up next session, this is the | ||
| > document that tells you what shipped, why, and what's left. | ||
|
|
||
| ## TL;DR | ||
|
|
||
| The archon service in `pmoves/docker-compose.yml` already wires most | ||
| of the live-workflow auth (CLAUDE_API_KEY, CLAUDE_CODE_OAUTH_TOKEN, | ||
| CLAUDE_USE_GLOBAL_AUTH, GH_TOKEN) — all from the upstream | ||
| `PMOVES-Archon/.env.example`, just renamed to PMOVES conventions. The | ||
| one remaining token from Issue #2217's "Auth for live workflows" | ||
| section is `CLAUDE_BIN_PATH`, which the TS archon server uses when | ||
| spawning the Claude CLI as a subprocess. This lane adds that one | ||
| token + documents the full set in `env.tier-agent.example`. | ||
|
|
||
| ## Why now | ||
|
|
||
| - Issue #2217's #4 ("Auth for live workflows") listed three things: | ||
| `CLAUDE_USE_GLOBAL_AUTH`, the `token` (ambiguous; either API key or | ||
| OAuth token), and `CLAUDE_BIN_PATH`. The first two are already | ||
| wired; `CLAUDE_BIN_PATH` is the only remaining piece. | ||
| - 4090-Claude is doing parallel work on the Agent Zero side | ||
| (checking latest upstream Archon and related docs). This lane | ||
| is the archon side of the same overall wiring. | ||
|
|
||
| ## What shipped (1 stacked commit) | ||
|
|
||
| ### `pmoves/docker-compose.yml` | ||
|
|
||
| Add `CLAUDE_BIN_PATH=${CLAUDE_BIN_PATH:-}` to the `archon` service | ||
| env, with a 4-line comment: | ||
|
|
||
| ```yaml | ||
| # CLAUDE_BIN_PATH: path to the Claude CLI binary inside the container. | ||
| # Default empty (uses $PATH). The upstream Archon Dockerfile installs | ||
| # Claude at /usr/local/bin/claude; set this only if the image builds | ||
| # Claude at a non-standard path or you want to pin a specific binary. | ||
| - CLAUDE_BIN_PATH=${CLAUDE_BIN_PATH:-} | ||
| ``` | ||
|
|
||
| The default is empty (uses $PATH), which is correct for the standard | ||
| upstream Archon image. Operators only need to set this if they're | ||
| running a custom build. | ||
|
|
||
| ### `pmoves/docker-compose.agents.yml` | ||
|
|
||
| Regenerated by `make -C pmoves compose-split` to reflect the new env | ||
| var on the `agents`-profile split. All other split overlays | ||
| (`core`, `media`, `ui`, `workers`, `apps`, `juicefs`) are unchanged | ||
| because they don't include the archon service. | ||
|
|
||
| ### `pmoves/env.tier-agent.example` | ||
|
|
||
| New "Archon — Claude / gh live-workflow auth (Issue #2217)" section | ||
| that documents the full set of live-workflow tokens: | ||
|
|
||
| ```bash | ||
| # --------------------------------------------------------------------------- | ||
| # Archon — Claude / gh live-workflow auth (Issue #2217) | ||
| # --------------------------------------------------------------------------- | ||
| # The TS server exits(1) at boot if no Claude auth is present. The compose | ||
| # file wires the following tokens to the `archon` service env. Set at least | ||
| # one of CLAUDE_API_KEY or CLAUDE_CODE_OAUTH_TOKEN; leave the others empty. | ||
| # | ||
| # CLAUDE_BIN_PATH: path to the Claude CLI binary inside the archon container. | ||
| # Default empty (uses $PATH). The upstream Archon Dockerfile installs Claude | ||
| # at /usr/local/bin/claude; set this only if your image builds Claude at a | ||
| # non-standard path or you want to pin a specific binary. | ||
| # | ||
| # GH_TOKEN: GitHub PAT for `gh auth` inside the container. Scopes: repo, workflow. | ||
| # Non-fatal warning if absent (workflows that need gh will fail at use-time). | ||
| CLAUDE_API_KEY= | ||
| CLAUDE_CODE_OAUTH_TOKEN= | ||
| CLAUDE_USE_GLOBAL_AUTH=false | ||
| CLAUDE_BIN_PATH= | ||
| GH_TOKEN= | ||
| ``` | ||
|
|
||
| This makes the operator's `env.shared` setup explicit. Previously | ||
| these were scattered between the compose file and the env template | ||
| without a unified comment. | ||
|
|
||
| ## Validation | ||
|
|
||
| - `yaml.safe_load` parses the main compose cleanly | ||
| - `make -C pmoves compose-split` reports 102/102 services across | ||
| overlays, all YAML syntactically valid | ||
| - No new failure modes introduced (the new env var has a safe default) | ||
|
|
||
| ## What does NOT change (intentionally) | ||
|
|
||
| - **The Makefile archon targets** (`up-archon-submodule`, | ||
| `up-archon-native`, `archon-smoke`, etc.) — they don't reference | ||
| `CLAUDE_BIN_PATH`. No change needed. | ||
| - **The `archon-data` / `archon-user-home` / `archon-pg-data` | ||
| volumes** — those are persistent state, not auth. | ||
| - **The upstream `PMOVES-Archon/.env.example` additional env vars:** | ||
| - `ENABLE_AGENT_WORK_ORDERS` (no work-orders service in PMOVES yet) | ||
| - `STATE_STORAGE_TYPE` / `FILE_STATE_DIRECTORY` (same) | ||
| - `SERVICE_DISCOVERY_MODE` (single-service deployment) | ||
| - `ENABLE_DOCKER_SOCKET_MONITORING` (security risk; HTTP mode is | ||
| the default; the archon service has no Docker socket mounted) | ||
| - `MCP_HEALTH_CHECK_TIMEOUT` (operational, low-priority) | ||
| - `LOGFIRE_TOKEN` / `LOG_LEVEL` (optional, low-priority) | ||
|
|
||
| We can wire these in a follow-up lane if Agent Work Orders is | ||
| ever added as a separate PMOVES service, or if the operator | ||
| wants the upstream's full env surface. | ||
|
|
||
| ## What's left for Issue #2217 (out of scope for this lane) | ||
|
|
||
| - Issue #2217's items #1 (first-class main-compose service), | ||
| #2 (fabric wiring), #3 (DB decision), and #5 (retire the dead | ||
| Python wrapper) are all already done in earlier PRs. Item #4 | ||
| (auth for live workflows) is now complete with this commit. | ||
|
|
||
| - This lane closes #2217. A follow-up AGNOTE closeout can mark it | ||
| SHIPPED. | ||
|
|
||
| ## Three-body | ||
|
|
||
| - **delivery:** Mavis (this lane) | ||
| - **control:** DARKXSIDE (operator sets `CLAUDE_BIN_PATH` in | ||
| env.shared if needed; verifies the archon service still boots) | ||
| - **memory:** this spec + 1 commit + 1 env var + 5 lines of comments | ||
| in `env.tier-agent.example` | ||
|
|
||
| ## CHIT trail | ||
|
|
||
| `unsigned-local` (no `CHIT_PASSPHRASE` in Mavis session). |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -62,6 +62,26 @@ ARCHON_SERVER_PORT=8091 | |
| ARCHON_MCP_PORT=8051 | ||
| ARCHON_SUPABASE_BASE_URL= | ||
|
|
||
| # --------------------------------------------------------------------------- | ||
| # Archon — Claude / gh live-workflow auth (Issue #2217) | ||
| # --------------------------------------------------------------------------- | ||
| # The TS server exits(1) at boot if no Claude auth is present. The compose | ||
| # file wires the following tokens to the `archon` service env. Set at least | ||
| # one of CLAUDE_API_KEY or CLAUDE_CODE_OAUTH_TOKEN; leave the others empty. | ||
|
Comment on lines
+65
to
+70
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win State the Archon exception to the TensorZero-only policy. The file says agent-tier services must not receive direct external LLM API keys, but this section instructs operators to set 🤖 Prompt for AI Agents |
||
| # | ||
| # CLAUDE_BIN_PATH: path to the Claude CLI binary inside the archon container. | ||
| # Default empty (uses $PATH). The upstream Archon Dockerfile installs Claude | ||
| # at /usr/local/bin/claude; set this only if your image builds Claude at a | ||
| # non-standard path or you want to pin a specific binary. | ||
| # | ||
| # GH_TOKEN: GitHub PAT for `gh auth` inside the container. Scopes: repo, workflow. | ||
| # Non-fatal warning if absent (workflows that need gh will fail at use-time). | ||
| CLAUDE_API_KEY= | ||
| CLAUDE_CODE_OAUTH_TOKEN= | ||
| CLAUDE_USE_GLOBAL_AUTH=false | ||
| CLAUDE_BIN_PATH= | ||
| GH_TOKEN= | ||
|
|
||
| # --------------------------------------------------------------------------- | ||
| # DeepResearch Settings | ||
| # --------------------------------------------------------------------------- | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When an operator follows the new template and sets
CLAUDE_BIN_PATHonly inenv.tier-agent, the documented rawdocker compose --profile agents ...invocation inpmoves/README.md:112does not use that file for Compose interpolation. This expression therefore resolves to an empty string, and the explicitenvironmententry overrides the value that the service'senv_filewould otherwise inject. Custom Archon images consequently fall back to$PATHand cannot launch Claude; the repository already identifies this exact empty-default shadowing pattern inpmoves/docs/operations/CREDENTIAL_AND_DRIFT_SITREP.md:85. Omit the explicit entry or ensure every supported invocation supplies the tier file with--env-file.Useful? React with 👍 / 👎.