mirror of
https://github.com/justlovemaki/AIClient-2-API.git
synced 2026-04-25 17:35:58 +03:00
[GH-ISSUE #71] TypeError: Cannot read properties of undefined (reading 'input_tokens') when using Claude Code with Kiro Auth #58
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/AIClient-2-API-justlovemaki#58
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @dustt112313 on GitHub (Nov 8, 2025).
Original GitHub issue: https://github.com/justlovemaki/AIClient-2-API/issues/71
I’m currently using Claude Code connected through Kiro Auth as the model provider. However, when running /context, the CLI throws the following error:
TypeError: Cannot read properties of undefined (reading 'input_tokens')
It seems the API responses from the Kiro Auth gateway do not include the usage.input_tokens field, which Claude Code depends on for tracking context usage and triggering automatic compaction.
As a result:
The /context command fails with the above TypeError.
Auto-compact doesn’t activate when the context window fills up.
I must manually start a new Claude Code session to reset the context window.
@justlovemaki commented on GitHub (Nov 9, 2025):
排查后发现是,kiro报错导致返回值没有input_tokens,报错原因是传参缺少必要参数。/context 执行第二次或第三次就有正常返回值了。
@dustt112313 commented on GitHub (Nov 9, 2025):
thank man