docker/agents/entrypoint.sh + edge/reproduce entrypoints: honor CLAUDE_CONFIG_DIR #644

Closed
opened 2026-04-10 18:54:51 +00:00 by dev-bot · 0 comments
Collaborator

Context

Once issues #641, #642, and #643 land, agent containers will receive CLAUDE_CONFIG_DIR as an env var pointing into the shared mount. A few agent entrypoints still hard-code /home/agent/.claude/... paths and need to honor the env var instead.

Files to change

  • docker/agents/entrypoint.sh:123 — replace the hard-coded creds existence check
  • docker/edge/entrypoint-edge.sh:68 — comment refers to /home/agent/.claude; update to mention $CLAUDE_CONFIG_DIR
  • docker/reproduce/entrypoint-reproduce.sh:18 — comment block listing mount paths; same fix

Specification

  1. docker/agents/entrypoint.sh:123:

    Current:

    elif [ -f /home/agent/.claude/credentials.json ]; then
      log "Auth: OAuth credentials mounted from host (~/.claude)"
    

    New:

    elif [ -f "${CLAUDE_CONFIG_DIR:-/home/agent/.claude}/credentials.json" ]; then
      log "Auth: OAuth credentials mounted from host (${CLAUDE_CONFIG_DIR:-~/.claude})"
    

    Fallback to the legacy path keeps the entrypoint working in containers that haven't been updated yet, but in the new world CLAUDE_CONFIG_DIR will always be set.

  2. docker/edge/entrypoint-edge.sh:68 — update the comment block to reference $CLAUDE_CONFIG_DIR (no behavioral change, this is just docs in code).

  3. docker/reproduce/entrypoint-reproduce.sh:18 — same comment-only fixup.

Definition of done

  • docker/agents/entrypoint.sh honors CLAUDE_CONFIG_DIR with legacy fallback
  • Comment fixups in the two entrypoint-*.sh files reflect the new path convention
  • Shellcheck passes
  • Smoke test: starting an agent container with CLAUDE_CONFIG_DIR=/var/lib/disinto/claude-shared/config and a populated shared dir logs Auth: OAuth credentials mounted from host (/var/lib/disinto/claude-shared/config)

Out of scope / do not touch

  • lib/agent-sdk.sh external flock wrapper (vision issue)
  • docker-compose.yml (separate backlog issue)
  • docker/edge/dispatcher.sh (separate backlog issue)
  • The .claude.json ro handling

Dependencies

Blocked by #641 (the env var convention). Fine to merge in parallel with #642 (compose) and #643 (dispatcher) once #641 has landed.

## Context Once issues #641, #642, and #643 land, agent containers will receive `CLAUDE_CONFIG_DIR` as an env var pointing into the shared mount. A few agent entrypoints still hard-code `/home/agent/.claude/...` paths and need to honor the env var instead. ## Files to change - **`docker/agents/entrypoint.sh:123`** — replace the hard-coded creds existence check - **`docker/edge/entrypoint-edge.sh:68`** — comment refers to `/home/agent/.claude`; update to mention `$CLAUDE_CONFIG_DIR` - **`docker/reproduce/entrypoint-reproduce.sh:18`** — comment block listing mount paths; same fix ## Specification 1. **`docker/agents/entrypoint.sh:123`**: Current: ```bash elif [ -f /home/agent/.claude/credentials.json ]; then log "Auth: OAuth credentials mounted from host (~/.claude)" ``` New: ```bash elif [ -f "${CLAUDE_CONFIG_DIR:-/home/agent/.claude}/credentials.json" ]; then log "Auth: OAuth credentials mounted from host (${CLAUDE_CONFIG_DIR:-~/.claude})" ``` Fallback to the legacy path keeps the entrypoint working in containers that haven't been updated yet, but in the new world `CLAUDE_CONFIG_DIR` will always be set. 2. **`docker/edge/entrypoint-edge.sh:68`** — update the comment block to reference `$CLAUDE_CONFIG_DIR` (no behavioral change, this is just docs in code). 3. **`docker/reproduce/entrypoint-reproduce.sh:18`** — same comment-only fixup. ## Definition of done - [ ] `docker/agents/entrypoint.sh` honors `CLAUDE_CONFIG_DIR` with legacy fallback - [ ] Comment fixups in the two `entrypoint-*.sh` files reflect the new path convention - [ ] Shellcheck passes - [ ] Smoke test: starting an agent container with `CLAUDE_CONFIG_DIR=/var/lib/disinto/claude-shared/config` and a populated shared dir logs `Auth: OAuth credentials mounted from host (/var/lib/disinto/claude-shared/config)` ## Out of scope / do not touch - `lib/agent-sdk.sh` external flock wrapper (vision issue) - `docker-compose.yml` (separate backlog issue) - `docker/edge/dispatcher.sh` (separate backlog issue) - The `.claude.json` ro handling ## Dependencies **Blocked by #641** (the env var convention). Fine to merge in parallel with #642 (compose) and #643 (dispatcher) once #641 has landed.
dev-bot added the
backlog
label 2026-04-10 18:54:51 +00:00
dev-bot self-assigned this 2026-04-10 20:54:16 +00:00
dev-bot added
in-progress
and removed
backlog
labels 2026-04-10 20:54:16 +00:00
dev-bot removed their assignment 2026-04-10 21:00:38 +00:00
dev-bot removed the
in-progress
label 2026-04-10 21:00:38 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: disinto-admin/disinto#644
No description provided.