目次
Claude Code UIをnpxで起動したらエラーが発生しました。解決したので備忘録として残します。
発生したエラー
npx @siteboon/claude-code-ui で起動すると、以下のエラーでクラッシュしました。
📖 Reading MCP servers from Claude config files
✅ Found Claude config at: /Users/xxx/.claude.json
📋 Found 0 MCP servers in config
Cursor MCP config not found: ENOENT: no such file or directory, open '/Users/xxx/.cursor/mcp.json'
node:_http_outgoing:700
throw new ERR_HTTP_HEADERS_SENT('set');
^
Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
at ServerResponse.setHeader (node:_http_outgoing:700:11)
at ServerResponse.header (...express/lib/response.js:794:10)
at ServerResponse.send (...express/lib/response.js:174:12)
at ServerResponse.json (...express/lib/response.js:278:15)
at ChildProcess.<anonymous> (file:///.../server/routes/codex.js:103:25)
MCP設定を読み込んだ後、server/routes/codex.js でクラッシュしています。
エラーの原因
ERR_HTTP_HEADERS_SENT は、HTTPレスポンスを2回送信しようとしたときに発生するエラーです。Claude Code UIの codex.js 内でエラーハンドリングに問題があると推測されます。
OpenAI Codex統合のコードが、使用していなくても読み込まれてエラーを起こしているようです。
発生条件
以下の環境で確認しました。
- Claude Code UI: v1.13.6
- Node.js: v22.20.0
- npxでの起動時に発生しやすい
- グローバルインストール(
npm install -g)でも発生することがある
解決方法
エラーが発生した場合は、以下の方法を試してください。
再起動する
まず最初に試すべきは再起動です。Ctrl+C で停止し、再度同じコマンドを実行してください。
npx @siteboon/claude-code-ui
一時的なエラーであれば、再起動で解消することがあります。
別の起動方法を試す
再起動で解決しない場合は、別の起動方法を試してください。
グローバルインストール:
npm install -g @siteboon/claude-code-ui
claude-code-ui
git clone:
git clone https://github.com/siteboon/claudecodeui.git
cd claudecodeui
npm install
npm run dev
起動後、ブラウザで http://localhost:3001 にアクセスすると使用できます。
留意点
このエラーはClaude Code UI側のバグと思われます。将来のバージョンで修正される可能性があります。
2026年1月時点では、GitHubのissuesに同様の報告は見つかりませんでした。もし同じエラーに遭遇した場合は、issueとして報告すると開発者の助けになるかもしれません。
