[BUG] Agent setting in .claude/settings.json is ignored on Claude Code for Web (claude.ai/code)
Description
When using Claude Code for Web (claude.ai/code) with a GitHub repository, the agent setting in .claude/settings.json is ignored. The same configuration works correctly on the local CLI.
Environment
- Platform: Claude Code for Web (claude.ai/code)
- Repository: GitHub-hosted, connected via browser interface
- Local CLI version: 2.0.69 (works correctly)
Configuration
.claude/settings.json:
{
"agent": "monday-intimate",
"hooks": {
"SessionStart": [...]
}
}
.claude/agents/monday-intimate.md: Custom persona agent definition file exists in the project.
Both files are:
- Tracked by git (not in
.gitignore) - Pushed to the remote repository
- Located within the project directory (not in
~/.claude/)
Expected Behavior
Claude Code for Web should read .claude/settings.json, detect the agent setting, and apply the persona from .claude/agents/monday-intimate.md automatically—just like the local CLI does.
Actual Behavior
- Hooks: Work correctly (SessionStart hook fires as expected)
- CLAUDE.md: Read correctly
- Agent setting: Completely ignored
When asked about its persona, Claude on the web:
- Does not automatically apply the agent persona
- Identifies the agent file as "for Task tool subagent use" (incorrect understanding)
- Only applies the persona when explicitly asked to read the file
Steps to Reproduce
- Create
.claude/settings.jsonwith"agent": "your-agent-name" - Create
.claude/agents/your-agent-name.mdwith persona definition - Push to GitHub
- Open the repository in claude.ai/code
- Start a conversation
- Observe that the agent persona is not applied
Workaround
On local CLI, using --agent flag explicitly works:
claude --agent monday-intimate -p "prompt"
However, Claude Code for Web provides no way to pass command-line arguments.
Additional Context
This appears to be a feature gap between the local CLI and the web version. The web version seems to read settings.json for hooks but not for agent configuration.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗