Skip to content

docs(models): add claude-code Docker recipe with host Max Plan auth#1526

Open
benfrank241 wants to merge 1 commit into
mainfrom
fix/docs-claude-code-docker-recipe
Open

docs(models): add claude-code Docker recipe with host Max Plan auth#1526
benfrank241 wants to merge 1 commit into
mainfrom
fix/docs-claude-code-docker-recipe

Conversation

@benfrank241
Copy link
Copy Markdown
Contributor

Summary

  • Adds a "Running with host Max Plan auth in Docker (Linux)" subsection under the existing Claude Code Setup docs in hindsight-docs/docs/developer/models.mdx.
  • Documents the full bind-mount surface required to run HINDSIGHT_API_LLM_PROVIDER=claude-code inside the standalone image: host claude CLI, single-file credential mounts (~/.claude.json + ~/.claude/.credentials.json), v2.1.128+ binary override for the bundled-binary protocol issue in claude-agent-sdk 0.5.x, and the post-docker run chown/symlink one-time setup.
  • Calls out the subtle gotchas explicitly: whole-directory :ro mounts of ~/.claude silently break the CLI (must be single-file mounts); the host directory bind-mounted at /home/hindsight/.pg0 must be writable by UID 1000 or the host UID under --user.
  • Restates the personal-use-only constraint from the parent section inline so the Docker recipe isn't read as a production pattern.
  • Cross-references Dockerfile: chmod 755 /home/hindsight to support --user UID:GID host-uid-matching #1481 (chmod 755 fix, already shipped) and README: document persistent volume host-uid ownership requirement #1483 (bind-mount UID note for .pg0).
  • Linux-only for now since that's what was verified in the source report. macOS Docker Desktop and Windows host paths differ and are noted as not yet covered, with an invitation to contribute verified recipes.

Closes #1480

Test plan

  • npm run build in hindsight-docs/ succeeds (no broken anchors, no MDX parse errors)
  • On a Linux host with claude auth login previously run, the documented docker run invocation + post-run setup brings up Hindsight successfully
  • curl http://127.0.0.1:8888/v1/default/banks/test/reflect -X POST -H "Content-Type: application/json" -d '{"query":"hello"}' returns a 200 with text generated via the Max Plan subscription
  • Whole-directory :ro mount of ~/.claude (anti-example) reproduces the silent CLI breakage as described

Adds a 'Running with host Max Plan auth in Docker (Linux)' subsection
under the existing Claude Code Setup docs. Documents the bind-mount
surface required to run HINDSIGHT_API_LLM_PROVIDER=claude-code inside
the standalone image: host claude CLI, single-file credential mounts,
the v2.1.128+ binary override for the bundled-binary protocol issue,
and the post-run chown/symlink steps.

Restates the personal-use-only constraint inline so the Docker recipe
isn't read as a production pattern. Verified on linux/amd64 per the
contributor's report; macOS and Windows paths are noted as not yet
covered.

Closes #1480
Copy link
Copy Markdown
Collaborator

@nicoloboschi nicoloboschi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of putting this into the docs, why don't we just create a docker compose in docker/compose directory for it?

we usually showcase setup in there

adding it to the docs it's a little bit too much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document claude-code provider container packaging requirements

2 participants