อ้างอิงข้อผิดพลาด
ค้นหา runtime error messages ของ Claude Code พร้อมความหมายและวิธีแก้ไข
หน้านี้แสดงรายการ runtime errors ที่ Claude Code แสดงและวิธีกู้คืนจากแต่ละรายการ สำหรับ installation errors เช่น command not found หรือ TLS failures ดู Troubleshoot installation and login
Claude Code เรียก Claude API สำหรับ model responses ดังนั้น runtime errors ส่วนใหญ่ map กับ API error code ที่อยู่เบื้องหลัง สำหรับคำนิยาม HTTP status code ดิบ ดู Claude Platform error reference
ค้นหาข้อผิดพลาดของคุณ
| ข้อความ | ส่วน |
|---|---|
API Error: 500 Internal server error | Server errors |
API Error: Repeated 529 Overloaded errors | Server errors |
Request timed out | Server errors |
You've hit your session limit / You've hit your weekly limit | Usage limits |
Usage credits required for 1M context | Usage limits |
Server is temporarily limiting requests | Usage limits |
Request rejected (429) | Usage limits |
Credit balance is too low | Usage limits |
Not logged in · Please run /login | Authentication |
Could not resolve authentication method | Authentication |
Invalid API key | Authentication |
This organization has been disabled | Authentication |
Unable to connect to API | Network |
SSL certificate verification failed | Network |
Prompt is too long | Request errors |
Automatic retries
Claude Code retry failures ชั่วคราวก่อนแสดงข้อผิดพลาด Server errors, overloaded responses, request timeouts, temporary 429 throttles และ dropped connections ถูก retry สูงสุด 10 ครั้งพร้อม exponential backoff
เมื่อคุณเห็นข้อผิดพลาดบนหน้านี้ retries เหล่านั้นหมดแล้ว ปรับพฤติกรรมด้วย environment variables:
| ตัวแปร | ค่าเริ่มต้น | ผล |
|---|---|---|
CLAUDE_CODE_MAX_RETRIES | 10 | จำนวน retry attempts |
API_TIMEOUT_MS | 600000 | Per-request timeout เป็น milliseconds |
Server errors
API Error: 500 Internal server error
API Error: 500 Internal server error. This is a server-side issue, usually temporary — try again in a moment. If it persists, check https://status.claude.com.
บ่งชี้ว่าเกิด failure ที่ไม่คาดคิดภายใน API ไม่ได้เกิดจาก prompt, settings หรือบัญชีของคุณ
วิธีแก้ไข:
- ตรวจสอบ status.claude.com สำหรับ incidents ที่ active
- รอหนึ่งนาทีจากนั้นส่ง message อีกครั้ง
- หากข้อผิดพลาดยังคงอยู่รัน
/feedback
API Error: Repeated 529 Overloaded errors
API Error: Repeated 529 Overloaded errors. The API is at capacity — this is usually temporary. Try again in a moment. If it persists, check https://status.claude.com.
API ชั่วคราวเต็มความสามารถ A 529 ไม่ใช่ usage limit และไม่ count ต่อ quota ของคุณ
วิธีแก้ไข:
- ตรวจสอบ status.claude.com
- ลองอีกครั้งในอีกสักครู่
- รัน
/modelและสลับไปยังโมเดลอื่น
Request timed out
API ไม่ตอบสนองก่อน connection deadline ค่าเริ่มต้นคือ 10 นาที
วิธีแก้ไข:
- Retry request
- สำหรับ long-running tasks แบ่ง work เป็น prompts ย่อย
- หาก network ช้า ให้เพิ่ม
API_TIMEOUT_MS
Auto mode ไม่สามารถตัดสินความปลอดภัยของ action
<model> is temporarily unavailable, so auto mode cannot determine the safety of <tool> right now.
หรือ:
Auto mode classifier transcript exceeded context window — falling back to manual approval (try /compact to reduce conversation size)
วิธีแก้ไข:
- Retry หลังจากไม่กี่วินาที
- รัน
/compactเพื่อลดขนาดการสนทนา
Usage limits
You've hit your session limit
Subscription plans มี rolling usage allowance เมื่อหมดจะเห็น:
You've hit your session limit · resets 3:45pm
You've hit your weekly limit · resets Mon 12:00am
วิธีแก้ไข:
- รอเวลา reset ที่แสดงใน error
- รัน
/usageเพื่อดู plan limits - รัน
/usage-creditsเพื่อซื้อ usage เพิ่ม
Usage credits required for 1M context
API Error: Usage credits required for 1M context · run /usage-credits to turn them on, or /model to switch to standard context
วิธีแก้ไข:
- รัน
/modelและเลือก variant ที่ไม่มี[1m]suffix - รัน
/usage-creditsเพื่อเปิด metered billing
Request rejected (429)
API Error: Request rejected (429) · this may be a temporary capacity issue.
วิธีแก้ไข:
- รัน
/statusและยืนยัน credential ที่ active ถูกต้อง - ตรวจสอบ provider console สำหรับ active limits
- ลด concurrency ด้วย
CLAUDE_CODE_MAX_TOOL_USE_CONCURRENCY
Credit balance is too low
Credit balance is too low
วิธีแก้ไข:
- เพิ่ม credits ที่ platform.claude.com/settings/billing
- สลับเป็น subscription authentication ด้วย
/login
Authentication errors
Not logged in
Not logged in · Please run /login
วิธีแก้ไข:
- รัน
/loginเพื่อยืนยันตัวตน - ยืนยัน
ANTHROPIC_API_KEYตั้งค่าและ export ใน shell
Could not resolve authentication method
Session ถึง API client โดยไม่มี credential
วิธีแก้ไข:
- ยืนยัน
ANTHROPIC_API_KEY,CLAUDE_CODE_OAUTH_TOKENหรือ cloud provider credentials ตั้งค่าใน environment - รัน
/statusใน interactive session เพื่อยืนยัน credential source
Invalid API key
Invalid API key · Fix external API key
วิธีแก้ไข:
- ตรวจสอบ typos และยืนยัน key ไม่ได้ถูก revoke ใน Console
- รัน
env | grep ANTHROPICเพื่อตรวจสอบ stale keys - Unset
ANTHROPIC_API_KEYและรัน/login
This organization has been disabled
Your ANTHROPIC_API_KEY belongs to a disabled organization · Unset the environment variable to use your other credentials
วิธีแก้ไข:
- Unset
ANTHROPIC_API_KEYใน shell ปัจจุบันและลบออกจาก profile - รัน
/statusเพื่อยืนยัน credential ที่ active คือ subscription
Your organization has disabled API key authentication
Your organization has disabled API key authentication · Run /login to sign in with your claude.ai account
วิธีแก้ไข:
- Unset
ANTHROPIC_API_KEYหากข้อความระบุถึงมัน - รัน
/loginเพื่อ sign in ด้วย claude.ai account
Network errors
Unable to connect to API
Unable to connect to API
วิธีแก้ไข:
- ตรวจสอบการเชื่อมต่ออินเทอร์เน็ต
- ตรวจสอบ proxy settings
- ยืนยัน firewall ไม่บล็อก outbound connections ไปยัง
api.anthropic.com
SSL certificate errors
SSL certificate verification failed
วิธีแก้ไข:
- ตั้ง
CLAUDE_CODE_CERT_STOREไปยัง custom CA bundle - ปรึกษา IT team เกี่ยวกับ corporate proxy certificates
Request errors
Prompt is too long
Prompt is too long
วิธีแก้ไข:
- รัน
/compactเพื่อสรุปการสนทนา - รัน
/clearเพื่อเริ่มการสนทนาใหม่ - แบ่ง task ใหญ่เป็น tasks ย่อย
There's an issue with the selected model
ตรวจสอบ model ID ที่กำหนดค่าใน environment variables, settings files และ CLI flags ตาม order ลำดับความสำคัญ
แจ้งข้อผิดพลาด
หาก /feedback ไม่มีในสภาพแวดล้อมของคุณ คุณสามารถ:
- เปิด GitHub issue ที่ github.com/anthropics/claude-code/issues
- ติดต่อ Anthropic support ผ่าน Console