Feature Request: Configurable Approval Request Timeout (or Unlimited)
Current Behavior
Approval requests in Kimi Code CLI have a hardcoded 300-second (5-minute) timeout. When this timeout is reached, the approval is automatically cancelled with "approval timed out" feedback, which appears as "Rejected by user" in the terminal (red text).
This behavior is defined in:
# approval_runtime/runtime.py, line 86
async def wait_for_response(
self, request_id: str, timeout: float = 300.0
) -> tuple[ApprovalResponseKind, str]:
Problem
Users who need time to research, verify, or think through approval decisions are experiencing frustrating timeouts. Common scenarios include:
-
Researching unfamiliar tools/commands: When Kimi proposes using a tool the user isn't familiar with, they may need to search documentation or Google to understand what it does before approving.
-
Verifying proposed changes: For complex diffs or file modifications, users may need to carefully review the changes, potentially opening files in their editor to understand the full context.
-
Cross-referencing requirements: Users may need to check project requirements, existing code patterns, or team conventions before approving certain actions.
-
Stepping away briefly: Users may need to step away from their desk momentarily while an approval is pending.
Comparison with Other Tools
| Tool |
Approval Timeout Behavior |
| Claude Code |
Unlimited - waits indefinitely for user response |
| Kimi Code CLI |
300 seconds (5 minutes) - hardcoded |
| GitHub Copilot Chat |
Unlimited in chat mode |
Proposed Solution
Option 1: Configurable Timeout (Recommended)
Add a configuration option in ~/.kimi/config.toml:
[approval]
# Timeout for approval requests in seconds
# Set to 0 or null for unlimited wait time
timeout_s = 300 # Default: 300 (5 minutes)
Option 2: Unlimited by Default
Change the default behavior to wait indefinitely, matching other agentic coding tools like Claude Code. Users who want timeouts can opt-in via configuration.
Option 3: Per-Request Timeout
Allow the AI to specify a timeout hint for urgent operations, while defaulting to unlimited for standard requests:
[approval]
default_timeout_s = 0 # 0 = unlimited
max_timeout_s = 3600 # Upper limit even for urgent requests
Additional Context
Related Code Locations
kimi_cli/approval_runtime/runtime.py:86 - wait_for_response() method
kimi_cli/tools/utils.py:182-198 - ToolRejectedError class (generates "Rejected by user" message)
Current Workarounds (Not Ideal)
- YOLO mode (
/yolo): Auto-approves all requests, but this is risky for important decisions
- Quick-approve then revert: Approve hastily, then use git to revert if needed
- Downgrade to v1.22: Some users report v1.22 has better timeout handling
Related Issues
Implementation Notes
The change would primarily involve:
- Reading the timeout value from configuration in
ApprovalRuntime
- Handling
None or 0 as "unlimited" (no asyncio.wait_for() wrapper)
- Documentation updates
Environment
- Kimi Code CLI version: 1.30 (and likely earlier)
- Platform: All platforms affected
Thank you for considering this feature request! The ability to have unlimited or configurable approval timeouts would significantly improve the user experience for thoughtful, careful development workflows.
Feature Request: Configurable Approval Request Timeout (or Unlimited)
Current Behavior
Approval requests in Kimi Code CLI have a hardcoded 300-second (5-minute) timeout. When this timeout is reached, the approval is automatically cancelled with "approval timed out" feedback, which appears as "Rejected by user" in the terminal (red text).
This behavior is defined in:
Problem
Users who need time to research, verify, or think through approval decisions are experiencing frustrating timeouts. Common scenarios include:
Researching unfamiliar tools/commands: When Kimi proposes using a tool the user isn't familiar with, they may need to search documentation or Google to understand what it does before approving.
Verifying proposed changes: For complex diffs or file modifications, users may need to carefully review the changes, potentially opening files in their editor to understand the full context.
Cross-referencing requirements: Users may need to check project requirements, existing code patterns, or team conventions before approving certain actions.
Stepping away briefly: Users may need to step away from their desk momentarily while an approval is pending.
Comparison with Other Tools
Proposed Solution
Option 1: Configurable Timeout (Recommended)
Add a configuration option in
~/.kimi/config.toml:Option 2: Unlimited by Default
Change the default behavior to wait indefinitely, matching other agentic coding tools like Claude Code. Users who want timeouts can opt-in via configuration.
Option 3: Per-Request Timeout
Allow the AI to specify a timeout hint for urgent operations, while defaulting to unlimited for standard requests:
Additional Context
Related Code Locations
kimi_cli/approval_runtime/runtime.py:86-wait_for_response()methodkimi_cli/tools/utils.py:182-198-ToolRejectedErrorclass (generates "Rejected by user" message)Current Workarounds (Not Ideal)
/yolo): Auto-approves all requests, but this is risky for important decisionsRelated Issues
Implementation Notes
The change would primarily involve:
ApprovalRuntimeNoneor0as "unlimited" (noasyncio.wait_for()wrapper)Environment
Thank you for considering this feature request! The ability to have unlimited or configurable approval timeouts would significantly improve the user experience for thoughtful, careful development workflows.