Skip to content

Conversation

@Mr-Neutr0n
Copy link

Summary

  • Fix regression where OPENCODE_EXPERIMENTAL_BASH_DEFAULT_TIMEOUT_MS environment variable is silently ignored
  • The flag was evaluated as a static const at module load time, so the env var value was captured once (as undefined) and never re-read
  • Convert the flag to a dynamic getter via Object.defineProperty (consistent with other dynamic flags like OPENCODE_CLIENT, OPENCODE_CONFIG_DIR)
  • Change DEFAULT_TIMEOUT in the bash tool from a module-level constant to a lazy function call so it reads the flag value at execution time

Test plan

  • Set OPENCODE_EXPERIMENTAL_BASH_DEFAULT_TIMEOUT_MS=5000 and verify bash commands time out after 5 seconds
  • Verify default timeout of 120000ms still applies when env var is not set
  • Verify invalid values (non-integer, negative, zero) are ignored and fallback to default

Fixes #12762

When OPENCODE_SERVER_PASSWORD is set, the auth middleware was applied to
all routes including /global/health. Health check endpoints should be
accessible without authentication so that monitoring tools and load
balancers can verify the server is running.

Skip the basicAuth check when the request path is /global/health.

Fixes anomalyco#12805
Sync the region prefix list and region checks in getSmallModel() with
the existing getModel() logic. The crossRegionPrefixes array was missing
jp., apac., and au. entries, and the region check only handled us and eu,
causing APAC regions (ap-northeast-1, ap-southeast-2, etc.) to fall
through without proper cross-region prefix mapping.

Fixes anomalyco#12824
The bash default timeout env var was being silently ignored because it
was evaluated once at module load time as a static const. Convert it to
a dynamic getter (via Object.defineProperty) and evaluate lazily in the
bash tool so the env var is read when the tool executes, not when the
module initializes.

Fixes anomalyco#12762
@github-actions
Copy link
Contributor

github-actions bot commented Feb 9, 2026

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

No duplicate PRs found

@Mr-Neutr0n
Copy link
Author

Closing to resubmit cleanly — this branch accidentally picked up changes from other PRs.

@Mr-Neutr0n Mr-Neutr0n closed this Feb 10, 2026
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