vision(#623): Claude identity isolation for disinto-chat #707
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
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: disinto-admin/disinto#707
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Goal
Give
disinto-chatits own Claude identity mount so its OAuth refresh races cannot corrupt the factory agents' shared~/.claudecredentials. Default to a separate~/.claude-chat/on the host; supportANTHROPIC_API_KEYas a fallback that skips OAuth entirely.Why
~/.claude.lockoperates outside bind-mounted directories, so two containers sharing~/.claudecan race during token refresh and invalidate each other. The factory has already had OAuth expiry incidents traced to multiple agents sharing credentials.Scope
Files to touch
lib/generators.shchat service block (from #705):${CHAT_CLAUDE_DIR:-${HOME}/.claude-chat}:/home/chat/.claude-chat.CLAUDE_CONFIG_DIR=/home/chat/.claude-chat/config,CLAUDE_CREDENTIALS_DIR=/home/chat/.claude-chat/config/credentials.ANTHROPIC_API_KEYis set in.env, pass it through and do not mount~/.claude-chatat all (no credentials on disk in that mode).bin/disinto disinto_init()— after #620's admin password prompt, add an optional prompt:Use separate Anthropic identity for chat? (y/N). On yes, create~/.claude-chat/and invokeclaude loginin a subshell withCLAUDE_CONFIG_DIR=~/.claude-chat/config.lib/claude-config.sh— factor out the existing~/.claudesetup logic so a non-defaultCLAUDE_CONFIG_DIRis a first-class parameter. If it is already parameterised, just document it; if not, extract a helpersetup_claude_dir <dir>and have the existing path call it with the default dir.docker/chat/Dockerfile— declareVOLUME /home/chat/.claude-chat, set owner to the non-root chat user introduced in #706.Out of scope
Affected files
lib/generators.sh— chat service block credential mountbin/disinto— init flow: separate chat identity promptlib/claude-config.sh— extract parameterised setup_claude_dir helperdocker/chat/Dockerfile— declare VOLUME for chat Claude dirAcceptance
disinto initwith "use separate chat identity" answered yes creates~/.claude-chat/and logs in successfully.ANTHROPIC_API_KEY=sk-ant-...set in.env, chat starts without any~/.claude-chatmount (verified viadocker inspect disinto-chat) and successfully completes a test prompt.CLAUDE_CONFIG_DIRandCLAUDE_CREDENTIALS_DIRinside the chat container resolve to/home/chat/.claude-chat/config*, not the shared factory path.Depends on
Notes
/var/lib/disinto/claude-shared(seelib/generators.sh:113,327,381,426). Chat must NOT use this path.flock("${HOME}/.claude/session.lock")logic mentioned in #623 is load-bearing, not redundant — do not "simplify" it.Boundaries for dev-agent
~/.claudewith the agents "just for convenience". The whole point of this chunk is the opposite.lib/claude-config.shbeyond extracting a parameterised helper if needed.Blocked — issue #707
ci_exhausted2026-04-12T02:37:16ZPlanner run 6: Relabeled
blocked→backlogfor ci_exhausted retry. This is sub-issue 9/10 for #623 — chat is 80% complete. CI exhaustion may be transient; worth another attempt.Blocked — issue #707
ci_exhausted_poll (3 attempts, PR #726)2026-04-12T06:04:23ZPlanner run 7: Relabeled
in-progress→blocked. Third CI exhaustion failure (ci_exhausted_poll with PR #726). Stale in-progress label — no active session. Filed #742 to investigate the systemic CI exhaustion pattern affecting both #707 and #712.Planner run 8: Cleared stale dev-bot assignment, added priority label. CI root cause (#742) is fixed — PR #754 merged. Ready for dev-agent retry. 3 prior ci_exhausted failures were due to systemic CI non-determinism, not issue quality.