Skip to content

agentsMd value silently ignored by claude / gemini presets — Claude Code only auto-discovers CLAUDE.md #134

@marvin-69-jpg

Description

@marvin-69-jpg

Summary

The chart's agentsMd value mounts the supplied content at {{ agent.home }}/AGENTS.md. This works for the default kiro preset (Kiro CLI follows the agents.md spec), but is silently ignored by the claude preset because Claude Code only auto-discovers CLAUDE.md, not AGENTS.md. The bot ends up with no project-level instructions and no warning is emitted anywhere.

Repro

helm install openab openab/openab --version 0.5.1 \
  --set agent.preset=claude \
  --set discord.botToken=... \
  --set-string discord.allowedChannels[0]=... \
  --set-file agentsMd=./AGENTS.md

Where ./AGENTS.md says something distinctive like:

# Identity
You are openab-bot. When asked "who are you", reply exactly with the
string "openab-bot identity confirmed".

Then in Discord:

@AgentBroker who are you?

Expected: bot replies with the distinctive string from AGENTS.md.
Actual: bot replies with the generic "I'm Claude, an AI assistant made by Anthropic..." — AGENTS.md is never loaded into context.

Evidence

AGENTS.md is correctly mounted in the pod:

$ kubectl exec deployment/openab -- ls -la /home/node/AGENTS.md
-rw-r--r-- 1 root node 4033 Apr  8 03:30 /home/node/AGENTS.md

But Claude Code's CLI source only references AGENTS.md in the context of /init-style bootstrapping (reading other AI tools' configs to generate a fresh CLAUDE.md):

$ grep -oE '.{60}AGENTS\.md.{60}' \
    /usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js
... existing CLAUDE.md, .claude/rules/, AGENTS.md, .cursor/rules ...
... reads existing AI coding tool configs (AGENTS.md, .cursor/rules ...)

Claude Code's project memory auto-discovery only loads CLAUDE.md. The Claude Agent SDK that claude-agent-acp wraps inherits this behavior.

claude-agent-acp itself sets systemPrompt = { type: "preset", preset: "claude_code" } and never injects the contents of AGENTS.md:

$ grep -nE 'systemPrompt' \
    /usr/local/lib/node_modules/@agentclientprotocol/claude-agent-acp/dist/acp-agent.js
957:    let systemPrompt = { type: "preset", preset: "claude_code" };
958:    if (params._meta?.systemPrompt) { ... }

So unless openab passes _meta.systemPrompt.append, no custom prompt reaches Claude Code at all.

Affected presets

Preset Auto-discovery file agentsMd works?
kiro (default) AGENTS.md
codex AGENTS.md ✅ (presumably)
claude CLAUDE.md
gemini GEMINI.md ❌ (presumably)

Workaround (in PVC)

Symlink works because the PVC persists:

kubectl exec deployment/openab -- ln -sf AGENTS.md /home/node/CLAUDE.md

The symlink survives restarts. But this defeats the chart's intent of treating agentsMd as a one-stop, declarative config — every operator will hit this and have to discover the workaround independently.

Suggested fix

Make the chart aware of which file the active preset wants. Something like: in templates/_helpers.tpl, define openab.agent.memoryFilename that resolves to CLAUDE.md for the claude preset, GEMINI.md for gemini, and AGENTS.md otherwise; then use it as the subPath mountPath in deployment.yaml.

Or: mount the same content at both AGENTS.md and CLAUDE.md (and GEMINI.md) so any preset is covered. Slight redundancy but zero preset-awareness needed in the helper.

Either fix is fully backwards compatible — existing users on the kiro preset are unaffected.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions