[GH-ISSUE #63] TERMINALS_IDLE_TIMEOUT_MINUTES=0 is documented as "disabled" but is a 30-minute reap on the kubernetes-operator backend #31

Open
opened 2026-10-18 21:13:35 +00:00 by bsakaguchi · 2 comments
Owner

Originally created by @wa91h on GitHub (Sep 17, 2026).
Original GitHub issue: https://github.com/open-webui/terminals/issues/63

Version: terminals / terminals-operator 0.2.4 (unchanged on main) · backend kubernetes-operator · installed via the terminals Helm chart 0.7.0

What happens

terminals/config.py:

# Idle reaper — tear down terminals after N minutes of inactivity (0 = disabled)
idle_timeout_minutes: int = 0

but backends/kubernetes_operator.py only forwards the value when it is positive:

if idle_timeout and idle_timeout > 0:
    cr_spec["idleTimeoutMinutes"] = idle_timeout

so a CR created with the setting at 0 has no idleTimeoutMinutes, and the operator fills the gap with 30 — twice over: manifests/terminal-crd.yaml declares default: 30 / minimum: 1, and operator/handler.py does spec.get("idleTimeoutMinutes", 30). Every idle-check log line reads (timeout=30). The same applies to a policy with idle_timeout_minutes: 0.

Net effect: "disabled" is the one value that cannot be expressed on this backend, and because the default terminal has no PVC, the user's files are deleted 30 minutes after their last request. We ran with 0 for three weeks believing pods were never reaped; every model-produced file was silently vanishing.

Expected

Either of:

  1. 0 means disabled all the way down — orchestrator passes idleTimeoutMinutes: 0, CRD minimum: 0, operator's idle_check returns early when the value is 0; or
  2. the setting/policy field rejects 0 on this backend with a clear error and the config comment says so.

(1) matches the documented contract.

Workaround

Any large positive value (we use 1440 with a PVC-backed policy).

Originally created by @wa91h on GitHub (Sep 17, 2026). Original GitHub issue: https://github.com/open-webui/terminals/issues/63 **Version:** `terminals` / `terminals-operator` 0.2.4 (unchanged on `main`) · backend `kubernetes-operator` · installed via the `terminals` Helm chart 0.7.0 ## What happens `terminals/config.py`: ```py # Idle reaper — tear down terminals after N minutes of inactivity (0 = disabled) idle_timeout_minutes: int = 0 ``` but `backends/kubernetes_operator.py` only forwards the value when it is positive: ```py if idle_timeout and idle_timeout > 0: cr_spec["idleTimeoutMinutes"] = idle_timeout ``` so a CR created with the setting at `0` has **no** `idleTimeoutMinutes`, and the operator fills the gap with 30 — twice over: `manifests/terminal-crd.yaml` declares `default: 30` / `minimum: 1`, and `operator/handler.py` does `spec.get("idleTimeoutMinutes", 30)`. Every idle-check log line reads `(timeout=30)`. The same applies to a policy with `idle_timeout_minutes: 0`. Net effect: "disabled" is the one value that cannot be expressed on this backend, and because the default terminal has no PVC, the user's files are deleted 30 minutes after their last request. We ran with `0` for three weeks believing pods were never reaped; every model-produced file was silently vanishing. ## Expected Either of: 1. `0` means disabled all the way down — orchestrator passes `idleTimeoutMinutes: 0`, CRD `minimum: 0`, operator's `idle_check` returns early when the value is `0`; or 2. the setting/policy field rejects `0` on this backend with a clear error and the config comment says so. (1) matches the documented contract. ## Workaround Any large positive value (we use `1440` with a PVC-backed policy).
Author
Owner

@owui-terminator[bot] commented on GitHub (Sep 17, 2026):

⚠️ Missing Issue Title Prefix

@wa91h, your issue title is missing a categorising prefix (e.g. bug:, feat:, docs:).

Please update the title to lead with one of:

  • bug: bug report or error
  • feat: feature request or enhancement
  • docs: documentation issue
  • question: usage question
  • help: support request

Example: bug: Login fails when the password contains special characters

<!-- gh-comment-id:5722871643 --> @owui-terminator[bot] commented on GitHub (Sep 17, 2026): # ⚠️ Missing Issue Title Prefix @wa91h, your issue title is missing a categorising prefix (e.g. `bug:`, `feat:`, `docs:`). Please update the title to lead with one of: - **bug**: bug report or error - **feat**: feature request or enhancement - **docs**: documentation issue - **question**: usage question - **help**: support request Example: `bug: Login fails when the password contains special characters`
Author
Owner

@owui-terminator[bot] commented on GitHub (Sep 18, 2026):

🔍 Related Issues Found

I found some existing issues that might be related. Please check if any of these are duplicates or contain helpful solutions:

  1. 🟣 #45 Idle reaper ignores policy idle_timeout_minutes for containers adopted via reconcile()
    Both issues involve idle reaping and the meaning of idle_timeout_minutes when the configured value is missing or zero. Issue #45 shows the same subsystem’s fallback behavior causing terminals to be treated as disabled/not reaped, which is closely related to the 0/disabled contract problem here.
    by Classic298

💡 If your issue is a duplicate, please close it and add any additional details to the existing issue instead.

This comment was generated automatically. React with 👍 if helpful, 👎 if not.

<!-- gh-comment-id:5722873689 --> @owui-terminator[bot] commented on GitHub (Sep 18, 2026): <!-- terminator-bot:related-issues-reply --> 🔍 **Related Issues Found** I found some existing issues that might be related. Please check if any of these are duplicates or contain helpful solutions: 1. 🟣 [#45](https://github.com/open-webui/terminals/issues/45) **Idle reaper ignores policy idle_timeout_minutes for containers adopted via reconcile()** *Both issues involve idle reaping and the meaning of `idle_timeout_minutes` when the configured value is missing or zero. Issue #45 shows the same subsystem’s fallback behavior causing terminals to be treated as disabled/not reaped, which is closely related to the 0/disabled contract problem here.* *by Classic298* --- 💡 If your issue is a duplicate, please close it and add any additional details to the existing issue instead. *This comment was generated automatically.* React with 👍 if helpful, 👎 if not.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
open-webui/terminals#31
No description provided.