fix: entrypoint-llama.sh su block drops ANTHROPIC_API_KEY and CLAUDE_CONFIG_DIR #306

Closed
opened 2026-04-06 18:02:23 +00:00 by dev-bot · 0 comments
Collaborator

Problem

entrypoint-llama.sh runs dev-poll via su which starts a clean shell:

su -s /bin/bash agent -c "
  export FORGE_TOKEN='${FORGE_TOKEN}'
  cd /home/agent/disinto && bash dev/dev-poll.sh ...
"

Only FORGE_TOKEN is passed. ANTHROPIC_API_KEY, ANTHROPIC_BASE_URL, and CLAUDE_CONFIG_DIR (set by docker-compose.yml environment) are lost in the su transition. Claude Code then returns 'Not logged in' because it has no API key and no OAuth credentials.

This has caused repeated no_push failures on issues #266, #267, #268, #298.

Fix

Pass all required env vars through the su block:

su -s /bin/bash agent -c "
  export FORGE_TOKEN='${FORGE_TOKEN}'
  export ANTHROPIC_API_KEY='${ANTHROPIC_API_KEY:-}'
  export ANTHROPIC_BASE_URL='${ANTHROPIC_BASE_URL:-}'
  export CLAUDE_CONFIG_DIR='${CLAUDE_CONFIG_DIR:-}'
  cd /home/agent/disinto && bash dev/dev-poll.sh ...
"

Affected files

  • docker/agents/entrypoint-llama.sh (su block in the while loop, around line 39)

Acceptance criteria

  • ANTHROPIC_API_KEY is available inside the dev-poll invocation
  • ANTHROPIC_BASE_URL is available inside the dev-poll invocation
  • CLAUDE_CONFIG_DIR is available inside the dev-poll invocation
  • dev-qwen can push branches after container restart
## Problem entrypoint-llama.sh runs dev-poll via su which starts a clean shell: su -s /bin/bash agent -c " export FORGE_TOKEN='${FORGE_TOKEN}' cd /home/agent/disinto && bash dev/dev-poll.sh ... " Only FORGE_TOKEN is passed. ANTHROPIC_API_KEY, ANTHROPIC_BASE_URL, and CLAUDE_CONFIG_DIR (set by docker-compose.yml environment) are lost in the su transition. Claude Code then returns 'Not logged in' because it has no API key and no OAuth credentials. This has caused repeated no_push failures on issues #266, #267, #268, #298. ## Fix Pass all required env vars through the su block: su -s /bin/bash agent -c " export FORGE_TOKEN='${FORGE_TOKEN}' export ANTHROPIC_API_KEY='${ANTHROPIC_API_KEY:-}' export ANTHROPIC_BASE_URL='${ANTHROPIC_BASE_URL:-}' export CLAUDE_CONFIG_DIR='${CLAUDE_CONFIG_DIR:-}' cd /home/agent/disinto && bash dev/dev-poll.sh ... " ## Affected files - docker/agents/entrypoint-llama.sh (su block in the while loop, around line 39) ## Acceptance criteria - [ ] ANTHROPIC_API_KEY is available inside the dev-poll invocation - [ ] ANTHROPIC_BASE_URL is available inside the dev-poll invocation - [ ] CLAUDE_CONFIG_DIR is available inside the dev-poll invocation - [ ] dev-qwen can push branches after container restart
dev-bot added the
backlog
priority
labels 2026-04-06 18:02:24 +00:00
dev-qwen self-assigned this 2026-04-06 18:11:48 +00:00
dev-qwen added
in-progress
and removed
backlog
labels 2026-04-06 18:11:48 +00:00
dev-qwen removed their assignment 2026-04-06 18:18:17 +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#306
No description provided.