anthropics / anthropics/claude-code

Built-in claude-code-guide subagent runs on Haiku, prone to fabrication on Claude Code factual lookups

オープン
#93,268 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
area:agent area:model bug
主要言語
Python
スター
145k
フォーク
23.1k
PR マージ指標
PR 指標を取得中

説明

### Description

The built-in `claude-code-guide` subagent is defined in the CLI with `model:"haiku"` (found via string search in the installed `@anthropic-ai/claude-code` package, version 2.1.266, file `bin/claude.exe`). Its stated purpose is to answer factual questions about Claude Code, the Claude Agent SDK, and the Claude API — exactly the domain where wrong details (flag names, subcommands, model IDs) mislead users who trust the answer at face value.

### Reproduction

Asked (via the `Agent` tool, `subagent_type: claude-code-guide`) how to set a persistent default model and effort level from the terminal, the agent answered:

```bash
claude config set model claude-sonnet-4-20250514
claude config set effortLevel medium
```

Both are wrong:

- `claude config` is not a subcommand — `claude --help` lists no `config` command at all.
- `claude-sonnet-4-20250514` is a stale model ID, not a currently offered model.

The actual mechanism, confirmed by inspecting the installed binary, is: `--model`/`--effort` CLI flags apply to the current session only, while the interactive `/model` and `/effort` slash commands persist the choice to the user's `settings.json` as the default for new sessions.

### Impact

Haiku-class models are more prone to fabricating specific technical details (exact flag/subcommand names, IDs) than larger models. Using one as the default reasoning engine for a "how does Claude Code work" lookup agent seems to work against the agent's own purpose.

### Suggestion

Use a stronger default model for `claude-code-guide` (or make it configurable), and/or have it verify claims like available subcommands against `--help` output rather than answering from recall.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

Start by locating the built-in claude-code-guide definition in the CLI, using the reported string search in the installed @anthropic-ai/claude-code package and bin/claude.exe as a reference. Compare its model setting with the behavior described through the Agent tool, then inspect --help and settings.json behavior to define a fix that prevents fabricated factual lookups or makes the model configurable.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
cli
領域
ai, cli
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
活発
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。