mirror of
https://github.com/hasso5703/alzeo.git
synced 2026-12-06 04:44:19 +01:00
Since 2.3.1 OpenCode 2 reads CLAUDE.md of every directory without AGENTS.md, and ~/.claude/CLAUDE.md as the global fallback, into every prompt (source v2.3.2: packages/cli/src/server-process.ts reads OPENCODE_DISABLE_CLAUDE_CODE_PROMPT at server start for instructions.claude; documented in docs/instructions and migrate-v1). Measured on the pinned 2.3.2 in a sandbox (/var/tmp/ocv2-bac-e56, fake server, canary key): with the project's CLAUDE.md and the HOME one in place, both markers land in the system message of every request, for run and for serve; with OPENCODE_DISABLE_CLAUDE_CODE_PROMPT=1 both are gone and /api/info answers 200 JSON. On a box ~/.claude/CLAUDE.md is the owner's private file, which must not leave in every Agent tab prompt. So the v2 render of opencode-web (the CAP_LINE block of install-agent.sh, which the 1.x render does not share) now carries Environment=OPENCODE_DISABLE_CLAUDE_CODE_PROMPT=1, and the v2 oc launcher exports it with a :-1 default (0 is not truthy for opencode, so the user can bring the files back by hand). The 1.x unit and launcher are byte-identical to before. Tests red on the old code: the v2 unit carries the line, the v1 unit does not; the v2 launcher exports it to the child and yields to an explicit 0, the v1 one does not. Generated by Mistral Vibe. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>