Skip to content

Conversation

@Mr-Neutr0n
Copy link

Summary

  • Change OPENCODE_EXPERIMENTAL_BASH_DEFAULT_TIMEOUT_MS from a static const (evaluated once at module load) to a dynamic getter via Object.defineProperty, so the env var is read at access time
  • Update bash.ts to use a getDefaultTimeout() function instead of the static DEFAULT_TIMEOUT constant

Closes #12762

Test plan

  • Set OPENCODE_EXPERIMENTAL_BASH_DEFAULT_TIMEOUT_MS=5000 before launching opencode, verify bash commands time out after 5 seconds
  • Verify default 2-minute timeout still applies when the env var is unset
  • Verify invalid values (negative, non-integer, non-numeric) are ignored and the default timeout is used

… env var

Change OPENCODE_EXPERIMENTAL_BASH_DEFAULT_TIMEOUT_MS from a static
module-load-time constant to a dynamic getter so the env var is read
at access time instead of import time. This allows the timeout to be
changed at runtime without restarting the process.

Closes anomalyco#12762
@github-actions
Copy link
Contributor

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

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.

OPENCODE_EXPERIMENTAL_BASH_DEFAULT_TIMEOUT_MS is being ignored

1 participant