openclaw - ✅(Solved) Fix [Bug]: openclaw approvals get --gateway default timeout can falsely report 'Config unavailable' [1 pull requests, 1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#66234Fetched 2026-04-14 05:38:43
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Author
Timeline (top)
cross-referenced ×2referenced ×2commented ×1

openclaw approvals get --gateway defaults to --timeout 10000. On a slower host, the command can time out while fetching config.get, then silently degrade the Effective Policy section to Config unavailable. even though gateway runtime, approvals snapshot, and real exec behavior are all healthy.

In practice this can look like an orion exec-approval regression, but it is actually a CLI timeout/reporting problem.

Error Message

  1. Improve the error/reporting so timeout is distinguished from genuine config unavailability

Root Cause

This command is the main operator-facing inspection path for exec approvals. A misleading timeout here can cause users to think:

  • agent exec approvals are broken
  • gateway config is missing
  • an upgrade regressed approval policy

when none of those are true.

Fix Action

Workaround

Use:

openclaw approvals get --gateway --timeout 60000

That restored the full Effective Policy output reliably on this host.

PR fix notes

PR #66239: fix(cli): harden approvals get timeout handling

Description (problem / solution / changelog)

Summary

  • Problem: openclaw approvals get --gateway inherited a 10s CLI timeout and could silently downgrade a config.get timeout into Config unavailable. even when the approvals snapshot itself succeeded.
  • Why it matters: on slower hosts this makes healthy exec approval state look broken or missing to operators.
  • What changed: approvals get now defaults to a 60s gateway timeout, preserves the approvals snapshot output, and reports config-load timeouts explicitly; the focused CLI regression test and changelog were updated too.
  • What did NOT change (scope boundary): this does not change gateway RPC semantics or the underlying approval policy calculation.

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor required for the fix
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

  • Closes #66234
  • Related #
  • This PR fixes a bug or regression

Root Cause (if applicable)

  • Root cause: approvals get used the generic nodesCallOpts 10s timeout even though the command does multiple serial RPCs (exec.approvals.get or exec.approvals.node.get, then config.get).
  • Missing detection / guardrail: config.get failures were collapsed to null, so timeouts and genuine config unavailability both rendered the same Config unavailable. note.
  • Contributing context (if known): the reported slow host completed successfully once the timeout was raised.

Regression Test Plan (if applicable)

  • Coverage level that should have caught this:
    • Unit test
    • Seam / integration test
    • End-to-end test
    • Existing coverage already sufficient
  • Target test or file: src/cli/exec-approvals-cli.test.ts
  • Scenario the test should lock in: approvals get --gateway uses the longer default timeout, and an explicit config.get timeout renders a timeout-specific Effective Policy note instead of a generic unavailability message.
  • Why this is the smallest reliable guardrail: the bug lives in CLI option defaults and CLI-side degradation/reporting, so the focused command test covers the exact decision points without requiring a live slow host.
  • Existing test that already covers this (if any): the file already covered the generic config.get-failure fallback path.
  • If no new test is added, why not: N/A

User-visible / Behavior Changes

  • openclaw approvals get now defaults to a 60s gateway timeout instead of inheriting the generic 10s node CLI timeout.
  • When the follow-up config.get call times out, Effective Policy now reports that timeout explicitly and suggests rerunning with a higher --timeout.

Diagram (if applicable)

N/A

Security Impact (required)

  • New permissions/capabilities? (Yes/No) No
  • Secrets/tokens handling changed? (Yes/No) No
  • New/changed network calls? (Yes/No) No
  • Command/tool execution surface changed? (Yes/No) No
  • Data access scope changed? (Yes/No) No
  • If any Yes, explain risk + mitigation:

Repro + Verification

Environment

  • OS: macOS 26.0 (Darwin 25.3.0)
  • Runtime/container: local repo checkout
  • Model/provider: N/A
  • Integration/channel (if any): gateway-mode CLI
  • Relevant config (redacted): N/A

Steps

  1. Reproduce the code path for openclaw approvals get --gateway on HEAD.
  2. Run pnpm test src/cli/exec-approvals-cli.test.ts.
  3. Verify the command now uses the longer default timeout and that an explicit timeout failure renders the timeout-specific note.

Expected

  • Healthy approvals snapshots on slow hosts should no longer misleadingly degrade to Config unavailable. under the default command timeout.
  • If config loading still times out, the CLI should say that it timed out.

Actual

  • The CLI now keeps the approvals snapshot output, defaults the command to a higher timeout budget, and distinguishes timeouts from genuine config unavailability.

Evidence

Attach at least one:

  • Failing test/log before + passing after
  • Trace/log snippets
  • Screenshot/recording
  • Perf numbers (if relevant)

Human Verification (required)

What you personally verified (not just CI), and how:

  • Verified scenarios: inspected the exact approvals get CLI path; ran pnpm test src/cli/exec-approvals-cli.test.ts; the scoped commit hook also passed the repo pnpm check lane.
  • Edge cases checked: explicit --timeout 10000 still yields a timeout-specific Effective Policy note; non-timeout config failures still preserve the generic unavailability fallback.
  • What you did not verify: a live reproduction against a remote slow-host gateway.

Review Conversations

  • I replied to or resolved every bot review conversation I addressed in this PR.
  • I left unresolved only the conversations that still need reviewer or maintainer judgment.

If a bot review conversation is addressed by this PR, resolve that conversation yourself. Do not leave bot review conversation cleanup for maintainers.

Compatibility / Migration

  • Backward compatible? (Yes/No) Yes
  • Config/env changes? (Yes/No) No
  • Migration needed? (Yes/No) No
  • If yes, exact upgrade steps:

Risks and Mitigations

  • Risk: operators may wait longer before seeing a timeout if the gateway is genuinely stalled.
    • Mitigation: --timeout remains user-configurable, and the degraded note now explains that the failure was a timeout.

Disclosure

  • AI-assisted: Yes
  • Testing level: focused local test plus repo hook verification (pnpm check)

Made with Cursor

Changed files

  • CHANGELOG.md (modified, +1/-0)
  • src/cli/exec-approvals-cli.test.ts (modified, +51/-6)
  • src/cli/exec-approvals-cli.ts (modified, +36/-16)

Code Example

openclaw approvals get --gateway

---

openclaw gateway status

---

openclaw approvals get --gateway --timeout 60000

---

openclaw approvals get --gateway --timeout 60000
RAW_BUFFERClick to expand / collapse

Summary

openclaw approvals get --gateway defaults to --timeout 10000. On a slower host, the command can time out while fetching config.get, then silently degrade the Effective Policy section to Config unavailable. even though gateway runtime, approvals snapshot, and real exec behavior are all healthy.

In practice this can look like an orion exec-approval regression, but it is actually a CLI timeout/reporting problem.

Environment

  • OpenClaw: 2026.4.12
  • Host: low-spec Debian box
  • Channel/session context irrelevant; reproduced directly via CLI

Reproduction

Run:

openclaw approvals get --gateway

On this host it often returns output equivalent to:

  • gateway timeout after 10000ms
  • Effective Policy -> Config unavailable.

However the following are all healthy at the same time:

openclaw gateway status
  • runtime: running
  • RPC probe: ok

And actual exec behavior is still correct.

If I rerun the same approvals command with a larger timeout:

openclaw approvals get --gateway --timeout 60000

then the command succeeds fully and Effective Policy renders normally.

On this machine, successful completion was around ~39.6s.

What seems to be happening

From the local installed CLI code path:

  • approvals snapshot is fetched first
  • then config.get is fetched to render Effective Policy
  • if that second call times out, the CLI catches it and reports only:
    • Config unavailable.

So the failure mode is misleading:

  • approvals data itself is fine
  • gateway config is actually available
  • CLI default timeout is just too short for this path on some machines

Expected behavior

One or more of the following:

  1. Increase the default timeout for openclaw approvals get --gateway
  2. Add a dedicated config/env override for this command's timeout
  3. Improve the error/reporting so timeout is distinguished from genuine config unavailability
  4. Optionally cache/reuse config more efficiently so Effective Policy rendering does not require such a slow second RPC on slower hosts

Actual behavior

Default command can falsely suggest a broken/missing policy state:

  • Config unavailable.

when the real issue is only CLI timeout.

Why this matters

This command is the main operator-facing inspection path for exec approvals. A misleading timeout here can cause users to think:

  • agent exec approvals are broken
  • gateway config is missing
  • an upgrade regressed approval policy

when none of those are true.

Workaround

Use:

openclaw approvals get --gateway --timeout 60000

That restored the full Effective Policy output reliably on this host.

extent analysis

TL;DR

Increase the timeout for the openclaw approvals get --gateway command to prevent false reports of config unavailability due to CLI timeout.

Guidance

  • Verify that the issue is indeed caused by a timeout by running the command with an increased timeout, such as openclaw approvals get --gateway --timeout 60000, and checking if the Effective Policy section is rendered correctly.
  • Consider setting a larger default timeout for the openclaw approvals get --gateway command to accommodate slower hosts.
  • If possible, investigate optimizing the config fetching and rendering process to reduce the time it takes to render the Effective Policy section.
  • Use the workaround openclaw approvals get --gateway --timeout 60000 to ensure accurate output until a more permanent solution is implemented.

Example

Running the command with an increased timeout:

openclaw approvals get --gateway --timeout 60000

This can help verify if the issue is indeed caused by a timeout and provide a temporary workaround.

Notes

The root cause of the issue is the default timeout of 10000ms being too short for slower hosts, causing the CLI to report Config unavailable. even though the gateway config is actually available. Increasing the timeout or optimizing the config fetching process can help resolve the issue.

Recommendation

Apply the workaround by using openclaw approvals get --gateway --timeout 60000 until a more permanent solution, such as increasing the default timeout or optimizing the config fetching process, is implemented. This will ensure accurate output and prevent false reports of config unavailability.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

One or more of the following:

  1. Increase the default timeout for openclaw approvals get --gateway
  2. Add a dedicated config/env override for this command's timeout
  3. Improve the error/reporting so timeout is distinguished from genuine config unavailability
  4. Optionally cache/reuse config more efficiently so Effective Policy rendering does not require such a slow second RPC on slower hosts

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING