Skip to content

Document local HYPERLOOM_RUNTIME_DIR for Codex on NFS - #1616

Merged
ZhengGong-amd merged 3 commits into
mainfrom
feature/yunkai/doc-codex-runtime-local-disk
Sep 23, 2026
Merged

ZhengGong-amd merged 3 commits into
mainfrom
feature/yunkai/doc-codex-runtime-local-disk

Conversation

@BaoYunkai

Copy link
Copy Markdown
Collaborator

Summary

  • Add a troubleshooting entry for Codex stalls and TraceLens roofline timeouts when Codex SQLite state lives on network storage (for example NFS v3 with local_lock=none).
  • Document that operators can keep USER_DATA_PATH on shared storage while pointing HYPERLOOM_RUNTIME_DIR at node-local fast disk.
  • Cross-link from the environment-variables and operations guides.

Test plan

  • Docs build/render (no code changes)
  • Review links to the new troubleshooting anchor

Operators often place USER_DATA_PATH on shared NFS while the Codex backend
stores SQLite state under the runtime tree; network mounts without reliable
locking stall multi-agent turns. Add troubleshooting guidance and cross-links
from the env and operations references.
@BaoYunkai
BaoYunkai requested a review from a team as a code owner September 23, 2026 03:46
@ZhengGong-amd

Copy link
Copy Markdown
Collaborator

Reconsider this as a description of the one parent rule that already exists. Do not add a placement mechanism.

_codex_home_parent is the only parent selection: HYPERLOOM_RUNTIME_DIR when set, otherwise the first safe writable root, otherwise the run directory. A parent inside a source checkout, or one that cannot be created, raises CodexSessionUnavailableError. No new environment variable. No branch on NFS or Weka by name.

The new troubleshooting text does not match that rule. With HYPERLOOM_RUNTIME_DIR unset, the parent is the writable root, not $USER_DATA_PATH/runtime (that path is only the installer default). _cleanup_codex_home removes .hyperloom-codex-home-* when the client closes, so listing it after the stage cannot verify success. The environment-variables row in this diff already states both facts.

If the entry stays, describe only that rule, and state that the directory is gone after close. The subprocess specialist's workspace/.codex is a second CODEX_HOME policy and does not read HYPERLOOM_RUNTIME_DIR: either say this entry does not cover it, or place that home through the same function. That second policy is the mechanism to remove.

Document the existing parent-selection order, cleanup of temporary
CODEX_HOME directories, specialist subprocess scope, and verification
steps that do not rely on post-close directory listings.
@BaoYunkai

Copy link
Copy Markdown
Collaborator Author

Thanks for the review — pushed a doc-only follow-up that aligns with the existing _codex_home_parent rule:

  • Troubleshooting now documents the single selection order (HYPERLOOM_RUNTIME_DIR → first safe writable root → run cwd), installer export vs in-code fallback, and _cleanup_codex_home removing .hyperloom-codex-home-* after the SDK client closes.
  • Verification no longer suggests listing Codex home directories after the stage; it points at df on the configured parent and at sqlite warnings only while a turn is still open.
  • Added an explicit scope note: subprocess specialist Codex uses <workspace>/.codex and does not read HYPERLOOM_RUNTIME_DIR. Unifying that second policy would be a separate code change; this PR stays documentation-only.

Let me know if you want the specialist path called out elsewhere or a follow-up issue for consolidating CODEX_HOME placement.

@ZhengGong-amd

Copy link
Copy Markdown
Collaborator

One remaining mismatch. The symptom lists “GEAK on Codex” as a caller of _codex_home_parent. It is not. Callers are TraceLens roofline (run_codex_turn) and orchestrator Codex turns. Forge-fusion / GEAK Codex uses kernelforge's own home (~/.cache/kernelforge/codex_home) and does not read HYPERLOOM_RUNTIME_DIR. Drop that example. The selection order, cleanup-on-close, and the specialist workspace/.codex exclusion are fine.

Drop GEAK as a _codex_home_parent caller; document KernelForge and
specialist subprocess CODEX_HOME paths as out of scope.
@BaoYunkai

Copy link
Copy Markdown
Collaborator Author

Removed GEAK from the symptom/caller list; scope now explicitly excludes KernelForge (~/.cache/kernelforge/codex_home) and specialist workspace/.codex. Callers limited to TraceLens roofline (run_codex_turn) and orchestrator Codex turns.

@ZhengGong-amd ZhengGong-amd left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

validated, approved

@ZhengGong-amd
ZhengGong-amd merged commit e39c2cb into main Sep 23, 2026
10 checks passed
@ZhengGong-amd
ZhengGong-amd deleted the feature/yunkai/doc-codex-runtime-local-disk branch September 23, 2026 08:14
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.

2 participants