fix: docs/CLAUDE-AUTH-CONCURRENCY.md: rewrite for shared CLAUDE_CONFIG_DIR approach (#646) #659
No reviewers
Labels
No labels
action
backlog
blocked
bug-report
cannot-reproduce
in-progress
in-triage
needs-triage
prediction/actioned
prediction/dismissed
prediction/unreviewed
priority
rejected
reproduced
tech-debt
underspecified
vision
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: disinto-admin/disinto#659
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/issue-646"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #646
Changes
AI Review
Claim Verification Failures
This doc describes the shared
CLAUDE_CONFIG_DIRarchitecture that PRs #644 and #645 supposedly introduced. However, every cross-reference in the "Where these values are defined" table and the "See also" section is wrong or points to non-existent code.critical
lib/claude-config.sh: File does not exist anywhere in the repo. The doc referenceslib/claude-config.sh:setup_claude_config_dir()and lists it in "See also" as the migration helper used bydisinto init. Grepping the repo finds no such file.critical
CLAUDE_SHARED_DIR: This env var does not appear anywhere in the codebase. The doc treats it as an established variable with defaults and a shared directory layout, butgrep -r CLAUDE_SHARED_DIRreturns zero results.critical
.env.example:92-99: The file is only 77 lines. Referenced lines do not exist. PR #645 was supposed to document these vars here, but the file ends at line 77.critical
lib/env.sh:138-140: The doc claims this is whereCLAUDE_SHARED_DIR/CLAUDE_CONFIG_DIRdefaults are defined. Those lines actually containexport CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1— unrelated. No defaults for the shared-dir vars exist anywhere in env.sh.critical
docker/edge/dispatcher.sh:446-448: The doc claims these lines are "Container mounts + env passthrough (edge dispatcher)". They are actually a loop that redacts-eflags from log output — unrelated.critical
docker/agents/entrypoint.sh:101-102: The doc claims this is "Auth detection usingCLAUDE_CONFIG_DIR". Those lines are log messages instructing operators to mount the claude binary — unrelated. There is no CLAUDE_CONFIG_DIR auth detection in that file.critical
lib/agent-sdk.sh:139,144: File is 117 lines; referenced lines do not exist. The flock is present but at lines 49 and 53.high
bin/disinto:952-962: The doc claims "Bootstrap / migration duringdisinto init" is here. Those lines implement_secrets_ensure_sops()— unrelated to claude config dir migration.high
lib/hire-agent.sh:435: Not mentioned in the doc, but this file hardcodesCLAUDE_CONFIG_DIR: /home/agent/.claude— the OLD per-container path. If the shared-dir architecture were actually implemented, this would need to pass the shared path. Its presence contradicts the doc's claim that the fix is in place.Root Cause
The preceding PRs (#644, #645) appear not to have implemented the architecture this doc describes, or the implementations landed in different locations. This doc was written against an expected state that doesn't match the actual repo.
Required Before Merge
CLAUDE_CONFIG_DIRarchitecture is actually implemented. If not, this doc should not claim it is.lib/claude-config.shwithsetup_claude_config_dir()or remove all references to it.CLAUDE_SHARED_DIR/CLAUDE_CONFIG_DIRdefaults tolib/env.sh(or correct the reference to where they actually live)..env.example(or correct the line numbers).docker/agents/entrypoint.shanddocker/edge/dispatcher.shto actually passCLAUDE_CONFIG_DIRpointing at the shared mount (or correct the line-number references).lib/hire-agent.sh:435to pass the shared path instead of the hardcoded per-container/home/agent/.claude.Verdict
REQUEST_CHANGES — Documentation cross-references are factually wrong: cited files, line numbers, and env vars do not exist in the codebase.
Reviewed at
b5807b3| AGENTS.mdAI Review: REQUEST_CHANGES — Documentation cross-references are factually wrong: cited files, line numbers, and env vars do not exist in the codebase.
AI Review
Summary
Documentation-only rewrite of to reflect the new shared-mount approach (#641). All claims verified against live code.
Claim Verification
lib/env.sh:138-140✓ —CLAUDE_SHARED_DIRandCLAUDE_CONFIG_DIRdefaults at exactly those lines.env.example:92-99✓ — operator documentation block at exactly those linesdocker/edge/dispatcher.sh:446-448✓ — shared-dir bind-mount andCLAUDE_CONFIG_DIRenv passthrough at those linesdocker/agents/entrypoint.sh:101-102✓ —CLAUDE_CONFIG_DIR-aware auth detection at those lineslib/claude-config.sh:setup_claude_config_dir()✓ — function exists and creates~/.claudeas a symlink toCLAUDE_CONFIG_DIRbin/disinto:952-962✓ —setup_claude_config_dirinvocation and env-var persistence at those lineslib/agent-sdk.sh:139,144✓ — external flock at those exact linesArchitecture correctness
The doc's claim that the external flock is now "redundant but harmless" defense-in-depth is accurate.
setup_claude_config_dir()creates~/.claudeas a symlink toCLAUDE_CONFIG_DIR, so${HOME}/.claude/session.lockresolves through the symlink to the shared filesystem — the flock still serializes cross-container at the invocation level whileproper-lockfilehandles it at the OAuth-refresh level.The rewrite correctly removes the now-false claim that Claude Code's internal lock doesn't work across containers (it failed because of the old mount layout, not an implementation defect — and that root cause is now fixed).
Verdict
APPROVE — All line references verified against code; architectural claims accurate; clean rewrite
Reviewed at
7e73e03| AGENTS.mdAI Review: APPROVE — All line references verified against code; architectural claims accurate; clean rewrite