bashOutputMaxChars

settings.json型number記述場所どの設定ファイルでも可

成功した Bash または PowerShell コマンドの出力のうち、Claude がインラインで受け取る文字数を設定する。出力が上限を超えると、Claude Code はそれをファイルに保存し、Claude には短いプレビューとファイルのパスが渡される。詳細なビルドログやテストスイート全体のログのようにコマンド出力が日常的に既定値を超え、Claude にファイルを開かずに読ませたい場合は、この上限を引き上げる。Claude Code v2.1.261 以降が必要。

既定値未設定であるため、Claude は最大 30,000 文字をインラインで受け取る。

記述例

{
  "bashOutputMaxChars": 100000
}

使い方・用途

  • 詳細なビルドログやテストスイートの全ログなど、コマンド出力が既定の上限を日常的に超える環境で、Claude がファイルを開かずに出力を読めるようにしたいとき
  • 成功した Bash や PowerShell コマンドの出力をインラインでどれだけ Claude に渡すかを、プロジェクトの規模やログの長さに合わせて調整したいとき
  • BASH_MAX_OUTPUT_LENGTH を個別に設定する代わりに、インライン上限と読み戻しウィンドウをひとつの設定でまとめて大きくしたいとき
英語原文

Set how many characters of a successful Bash or PowerShell command's output Claude receives inline. When output passes the limit, Claude Code saves it to a file and Claude receives a short preview plus the file's path. Raise the limit when command output, such as a verbose build or a full test-suite log, routinely overflows the default and you want Claude to read it without opening the file. Requires Claude Code v2.1.261 or later.

関連する変更履歴

v2.1.261(1件)

bashOutputMaxChars と taskOutputMaxChars 設定を追加し、コマンドやバックグラウンドタスクの出力をファイルに保存する前に Claude がインラインで受け取れる量を最大 128K 文字まで引き上げられるようにした。
英語原文を表示
Added bashOutputMaxChars and taskOutputMaxChars settings to raise how much command and background-task output Claude receives inline before it is saved to a file, up to 128K characters

変更後

長いビルドログやテストスイートの出力など、デフォルトの上限を超えるコマンド出力があっても、Claude が最大128K文字までそのまま受け取れるため、ファイルを開かせずにその場で出力全体を解析・処理できる。