[GH-ISSUE #1134] [Feature]: Claude Subscription Docker setup has missing stairs for new users #561

Closed
opened 2026-10-20 17:30:13 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @aeriondyseti on GitHub (May 24, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1134

What problem does this solve?

Marinara has a built-in Claude Subscription provider that supports a long-lived OAuth token via CLAUDE_CODE_OAUTH_TOKEN. The reference docs (docs/CONFIGURATION.md) explain both CLAUDE_CODE_OAUTH_TOKEN and CLAUDE_CONFIG_DIR clearly. But for a new user setting up via Docker, the path from "I want to use my Claude Pro/Max subscription" to "it works" has multiple unmarked stairs:

  1. .env.example has zero mention of CLAUDE_CODE_OAUTH_TOKEN or CLAUDE_CONFIG_DIR. Users following the standard "copy .env.example to .env and edit" pattern never see Claude Subscription as a configurable option.

  2. docker-compose.yml doesn't pass either variable through to the container. Even users who learn about the variable from CONFIGURATION.md can't actually use it via the standard compose without a custom docker-compose.override.yml.

  3. Under default Docker config, the provider's failure mode is Not logged in · Please run /login. That phrasing pushes users toward the credentials-file path (~/.claude/credentials.json, claude login interactively, mount troubleshooting) rather than the much simpler token-based fix.

Net result: a well-documented feature is effectively invisible to anyone following the standard installation flow. I hit this myself today setting Marinara up on a LAN lab server — once I knew the token-based path existed, the fix took 30 seconds, but discovering it took an hour of source-reading.

Proposed solution

Surface both env vars as first-class options in the standard install flow:

  • docker-compose.yml: pass CLAUDE_CODE_OAUTH_TOKEN=${CLAUDE_CODE_OAUTH_TOKEN:-} and CLAUDE_CONFIG_DIR=${CLAUDE_CONFIG_DIR:-/app/data/claude-config} through to the container. The :- default keeps the change no-op for users who don't set either; the ${...} substitution accepts either a value from .env (the canonical Marinara config path) or a shell export.

  • .env.example: add a commented-empty section with the full token-generation walkthrough inline (npm i -g @anthropic-ai/claude-code, claude login, claude setup-token, paste below or export to shell). Place it near the existing third-party provider entries (Giphy, Spotify) so it's discoverable by anyone reading top-to-bottom.

24 insertions across 2 files, no existing behavior changes. A small follow-up could add a brief "Quickstart: Claude Subscription via Docker" callout to docs/installation/containers.md, but the .env.example + compose changes carry most of the discoverability win on their own.

Alternatives considered

  • Improve the error message instead: change the SDK's "Please run /login" to mention CLAUDE_CODE_OAUTH_TOKEN as an alternative. The SDK is an upstream Anthropic dependency, so this would require coordination outside the repo.
  • Bind-mount ~/.claude/ from host: works for the CLI but the Agent SDK still uses the bundled subprocess, and the permission gotchas (container-root writing to user-owned host dir) make it brittle for headless setups.
  • Documentation-only: add a "Claude Subscription quickstart" doc but leave .env.example and compose untouched. Less effective — users who skip docs and go straight to .env still wouldn't see it.

The proposed solution is the cheapest path that closes the discoverability gap end-to-end.

Additional context

  • Draft PR with the proposed implementation: #1133
  • Related code paths: packages/server/src/services/llm/providers/claude-subscription.provider.ts
  • Related upstream package: @anthropic-ai/claude-agent-sdk

Template check

  • I DID NOT read this template and provide the requested details.
Originally created by @aeriondyseti on GitHub (May 24, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1134 ## What problem does this solve? Marinara has a built-in Claude Subscription provider that supports a long-lived OAuth token via `CLAUDE_CODE_OAUTH_TOKEN`. The reference docs (`docs/CONFIGURATION.md`) explain both `CLAUDE_CODE_OAUTH_TOKEN` and `CLAUDE_CONFIG_DIR` clearly. But for a new user setting up via Docker, the path from "I want to use my Claude Pro/Max subscription" to "it works" has multiple unmarked stairs: 1. `.env.example` has zero mention of `CLAUDE_CODE_OAUTH_TOKEN` or `CLAUDE_CONFIG_DIR`. Users following the standard "copy `.env.example` to `.env` and edit" pattern never see Claude Subscription as a configurable option. 2. `docker-compose.yml` doesn't pass either variable through to the container. Even users who learn about the variable from `CONFIGURATION.md` can't actually use it via the standard compose without a custom `docker-compose.override.yml`. 3. Under default Docker config, the provider's failure mode is `Not logged in · Please run /login`. That phrasing pushes users toward the credentials-file path (`~/.claude/credentials.json`, `claude login` interactively, mount troubleshooting) rather than the much simpler token-based fix. Net result: a well-documented feature is effectively invisible to anyone following the standard installation flow. I hit this myself today setting Marinara up on a LAN lab server — once I knew the token-based path existed, the fix took 30 seconds, but discovering it took an hour of source-reading. ## Proposed solution Surface both env vars as first-class options in the standard install flow: - `docker-compose.yml`: pass `CLAUDE_CODE_OAUTH_TOKEN=${CLAUDE_CODE_OAUTH_TOKEN:-}` and `CLAUDE_CONFIG_DIR=${CLAUDE_CONFIG_DIR:-/app/data/claude-config}` through to the container. The `:-` default keeps the change no-op for users who don't set either; the `${...}` substitution accepts either a value from `.env` (the canonical Marinara config path) or a shell `export`. - `.env.example`: add a commented-empty section with the full token-generation walkthrough inline (`npm i -g @anthropic-ai/claude-code`, `claude login`, `claude setup-token`, paste below or `export` to shell). Place it near the existing third-party provider entries (Giphy, Spotify) so it's discoverable by anyone reading top-to-bottom. 24 insertions across 2 files, no existing behavior changes. A small follow-up could add a brief "Quickstart: Claude Subscription via Docker" callout to `docs/installation/containers.md`, but the `.env.example` + compose changes carry most of the discoverability win on their own. ## Alternatives considered - **Improve the error message instead**: change the SDK's "Please run /login" to mention `CLAUDE_CODE_OAUTH_TOKEN` as an alternative. The SDK is an upstream Anthropic dependency, so this would require coordination outside the repo. - **Bind-mount `~/.claude/` from host**: works for the CLI but the Agent SDK still uses the bundled subprocess, and the permission gotchas (container-root writing to user-owned host dir) make it brittle for headless setups. - **Documentation-only**: add a "Claude Subscription quickstart" doc but leave `.env.example` and compose untouched. Less effective — users who skip docs and go straight to `.env` still wouldn't see it. The proposed solution is the cheapest path that closes the discoverability gap end-to-end. ## Additional context - Draft PR with the proposed implementation: #1133 - Related code paths: `packages/server/src/services/llm/providers/claude-subscription.provider.ts` - Related upstream package: `@anthropic-ai/claude-agent-sdk` ## Template check - [ ] I DID NOT read this template and provide the requested details.
Author
Owner

@cha1latte commented on GitHub (May 25, 2026):

Triage note: labeling this as normal-scope because the request is a focused Docker discoverability fix for existing Claude Subscription environment variables, limited to compose/env-example setup paths.

The least risky next step is to keep it in the normal enhancement backlog and verify the Docker token path without expanding into broader Claude auth UX.

<!-- gh-comment-id:4536671606 --> @cha1latte commented on GitHub (May 25, 2026): Triage note: labeling this as `normal-scope` because the request is a focused Docker discoverability fix for existing Claude Subscription environment variables, limited to compose/env-example setup paths. The least risky next step is to keep it in the normal enhancement backlog and verify the Docker token path without expanding into broader Claude auth UX.
Author
Owner

@cha1latte commented on GitHub (May 26, 2026):

closed in #1133

<!-- gh-comment-id:4538722929 --> @cha1latte commented on GitHub (May 26, 2026): closed in #1133
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
Pasta-Devs/Marinara-Engine#561
No description provided.