Skip to content

fix(cli): cap cloud-managed shell command timeouts - #10478

Merged
eshurakov merged 4 commits into
mainfrom
session/agent_7b5bdb9a-9516-46c4-bf58-9522a10dd652
Jun 11, 2026
Merged

fix(cli): cap cloud-managed shell command timeouts#10478
eshurakov merged 4 commits into
mainfrom
session/agent_7b5bdb9a-9516-46c4-bf58-9522a10dd652

Conversation

@kilo-code-bot

@kilo-code-bot kilo-code-bot Bot commented May 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • let hosted runtimes cap shell command duration through KILO_COMMAND_TIMEOUT_MAX_MS
  • surface environment-specific timeout guidance from optional KILO_COMMAND_TIMEOUT_MAX_MS_MESSAGE when that cap terminates work
  • cover shell tool, direct shell execution, and command-template expansion paths

@kilo-code-bot
kilo-code-bot Bot force-pushed the session/agent_7b5bdb9a-9516-46c4-bf58-9522a10dd652 branch from 4cf8432 to 57a4f4a Compare May 21, 2026 09:34
@eshurakov
eshurakov force-pushed the session/agent_7b5bdb9a-9516-46c4-bf58-9522a10dd652 branch 2 times, most recently from b3a11e2 to 54e7040 Compare June 8, 2026 14:29
@eshurakov
eshurakov marked this pull request as ready for review June 8, 2026 19:15
Comment thread packages/opencode/src/kilocode/command-timeout.ts Outdated
Comment thread packages/opencode/src/session/prompt.ts Outdated
@kilo-code-bot

kilo-code-bot Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Overview

Incremental review through commit 7952443028 (test: provide runtime flags to timeout coverage).

The single new commit adds RuntimeFlags.defaultLayer to the shell integration test layer in command-timeout.test.ts. This is a correct fix — shell.ts line 366 yields RuntimeFlags.Service, so the shell.instance(...) test would have failed with a missing service defect without this layer. All previously flagged issues remain resolved.

Area Status
command-timeout.ts — race timer fires at exact env cap Clean
command-timeout.tsdrain() / wait() logic Clean
prompt.tstimeout variable holds message string or undefined Clean
shell.tskilocode_change markers, clamp/message usage Clean
command-timeout.test.tsRuntimeFlags.defaultLayer added to shell layer Fixed
command-timeout.test.tsafterEach restores env vars; test isolation Clean
Files Reviewed (5 files)
  • .changeset/calm-shells-timeout.md
  • packages/opencode/src/kilocode/command-timeout.ts
  • packages/opencode/src/session/prompt.ts
  • packages/opencode/src/tool/shell.ts
  • packages/opencode/test/kilocode/command-timeout.test.ts

Reviewed by claude-4.6-sonnet-20260217 · 538,127 tokens

Review guidance: REVIEW.md from base branch main

@eshurakov
eshurakov force-pushed the session/agent_7b5bdb9a-9516-46c4-bf58-9522a10dd652 branch 3 times, most recently from a313fe3 to be003f7 Compare June 9, 2026 11:56
Comment thread packages/opencode/test/tool/shell.test.ts Outdated
Comment thread packages/opencode/test/session/prompt.test.ts Outdated
Comment thread packages/opencode/test/session/prompt.test.ts Outdated

@marius-kilocode marius-kilocode left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please let's reiterate on this

@eshurakov
eshurakov force-pushed the session/agent_7b5bdb9a-9516-46c4-bf58-9522a10dd652 branch from 17dec9b to 5b47452 Compare June 10, 2026 12:11
@eshurakov
eshurakov force-pushed the session/agent_7b5bdb9a-9516-46c4-bf58-9522a10dd652 branch from 5b47452 to 7952443 Compare June 10, 2026 13:04
@eshurakov
eshurakov merged commit 5bc8df8 into main Jun 11, 2026
23 of 25 checks passed
@eshurakov
eshurakov deleted the session/agent_7b5bdb9a-9516-46c4-bf58-9522a10dd652 branch June 11, 2026 08:40
t7tran pushed a commit to t7tran/kilocode that referenced this pull request Aug 14, 2026
* fix(cli): cap cloud-managed shell command timeouts

* refactor(cli): isolate hosted shell timeout policy

* chore(cli): annotate hosted timeout message

* test(cli): provide runtime flags to timeout coverage

---------

Co-authored-by: Evgeny Shurakov <eshurakov@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants