Repository navigation
revert: keep OpenClaw's native state temporary again - #2
Merged
Merged
Conversation
This reverts commit f33fa19, which extends the kept-state start path that the next commit removes. Signed-off-by: San Dang <sdang@nvidia.com>
This reverts the merge of sandl99/feat/openclaw-keep-state (8994291), which made the OpenClaw Gateway use the agent's kept state folder as OPENCLAW_STATE_DIR. The kept folder also keeps OpenClaw's Gateway owner lease. The adapter force-kills the Gateway five seconds after SIGTERM, before OpenClaw releases that lease, and OpenClaw reclaims a leftover lease only on the same hostname. A replacement sandbox with a new hostname then can't start for up to five minutes. With temporary state, the lease is discarded at stop. The OpenClaw descriptor no longer accepts runtime.keep_state, and the catalog and docs return to temporary state. Signed-off-by: San Dang <sdang@nvidia.com>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Reverts #1, which made OpenClaw keep its native state in the agent's state folder with
runtime.keep_state, because of the blocker in NVIDIA#626.The kept folder also keeps OpenClaw's Gateway owner lease, a row in
state/openclaw.sqlite. On stop, the adapter sends SIGTERM and force-kills the Gateway aftershutdown_timeout_seconds(5 s). In an OpenShell sandbox the Gateway needs about 7 s to release the lease, so the lease is left in the kept state. OpenClaw reclaims a leftover lease only from the same hostname; a replacement Docker sandbox has a new hostname and fails to start withAnother Gateway owner lease is still active for this state directoryfor up to five minutes. With temporary state, the lease is discarded at stop, so replacement starts again.Details
runtime.keep_state, and the adapter catalog is regenerated.OPENCLAW_STATE_DIRagain, and the dashboard token returns to the per-runtimeinterfacesfolder.docs/integrations/harness/openclaw/openclaw.mdx.runtime.keep_stateare unchanged. Compared with1f78f481(the branch before feat: keep OpenClaw's native state in the agent's state folder #1 merged, plus main), the descriptor, mock, and SDK guide are identical; the remaining OpenClaw differences are feat: accept a skill folder or a folder of skills in skills.paths NVIDIA/NeMo-Fabric#615's skill-path changes.OpenClaw skill retention returns as a known gap until the shutdown in NVIDIA#626 releases the lease before the force-kill.
Validation
pytest tests/adapters/test_openclaw.py tests/adapters/test_openclaw_health.py tests/e2e/test_openclaw_skills.py tests/python/test_adapter_capabilities.py tests/python/test_harness_settings_validation.py: 310 passed, 24 skipped.tests/adapters/test_openclaw.pywith the Linux-only mock-Gateway markers lifted on macOS: 138 passed.test_status_command_timeout_stops_children_holding_the_pipesfailed once in that run and passed three times alone and in a full rerun.tests/e2e/test_openclaw_skills.pyagainst OpenClaw 2026.9.34: 5 passed.generate_adapter_catalog.py --check,ruff check, the copyright-header hook, andgit diff --check.Where should the reviewer start?
The conflict resolution in the second commit:
adapters/python/openclaw/openclaw.fabric-adapter.json,docs/sdk/python.mdx, anddocs/integrations/harness/openclaw/openclaw.mdx.Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)
Relates to [Bug]: Fabric force-kills OpenClaw before shutdown finishes, blocking replacement with retained state NVIDIA/NeMo-Fabric#626
Relates to [Enhancement]: P0 adapters: cold resume and usable agent-installed plugins across restarts NVIDIA/NeMo-Fabric#578
I confirm this contribution is my own work, or I have the right to submit it under this project's license.
I searched existing issues and open pull requests, and this does not duplicate existing work.