Skip to content

lazycodex-ai doctor hardcodes /tmp, relies on inner codex exec networking, and expects obsolete aggregate hook layout #80

Description

@kobeng

Summary

lazycodex-ai doctor currently mixes three assumptions that break diagnosis in my environment:

  1. the doctor workflow hardcodes source sync under /tmp
  2. the workflow delegates diagnosis to an inner codex exec, which does not inherit the host's working GitHub network/DNS
  3. lcx-doctor still checks for a root hooks/hooks.json, but the current aggregate OMO plugin manifest no longer uses that layout

I verified these against current lazycodex source at commit d4c4f05.

Environment

  • macOS Darwin 25.5.0 arm64
  • Codex CLI 0.142.2
  • LazyCodex plugin/OMO version 4.13.0
  • Host machine can access GitHub normally

Problem 1: doctor hardcodes /tmp

Current doctor entry prompt says:

  • Sync the latest LazyCodex and OpenAI Codex sources into /tmp

Current lcx-doctor/SKILL.md also says:

  • writes must be under /tmp
  • sync to /tmp/lazycodex-source
  • sync to /tmp/openai-codex-source

That fails in environments where /tmp is blocked or where the intended temp root is $TMPDIR.

I locally patched the skill to use:

SOURCE_ROOT="${TMPDIR:-/tmp}"
sync_latest_source code-yeongyu/lazycodex "$SOURCE_ROOT/lazycodex-source"
sync_latest_source openai/codex "$SOURCE_ROOT/openai-codex-source"

and confirmed the workflow then targeted my project-local .tmp/ directory instead of /tmp/.

Problem 2: inner codex exec does not inherit host networking

The host machine can reach GitHub:

gh api rate_limit
git ls-remote https://github.com/openai/codex.git HEAD

Both succeed on the host.

But the same commands inside the codex exec session used by lazycodex-ai doctor fail:

error connecting to api.github.com
check your internet connection or https://githubstatus.com
fatal: unable to access 'https://github.com/openai/codex.git/': Could not resolve host: github.com

So even after fixing the /tmp path, the current design still blocks source sync because the inner Codex execution environment does not have the same DNS/network behavior as the host.

Problem 3: lcx-doctor expects obsolete aggregate hook layout

Current source aggregate manifest:

plugins/omo/.codex-plugin/plugin.json

declares hooks as an array of direct file paths:

"hooks": [
  "./hooks/session-start-loading-project-rules.json",
  "./hooks/session-start-recording-session-telemetry.json",
  ...
]

And current source test explicitly asserts that aggregate OMO does not use ./hooks/hooks.json:

plugins/omo/test/aggregate-manifest.test.mjs

assert(!hookPaths.includes("./hooks/hooks.json"));

However lcx-doctor still checks for:

  • hooks/hooks.json

under the installed aggregate plugin root.

That creates a false negative: the installed payload can match source exactly while doctor still reports the aggregate hook payload as suspicious because it is checking an outdated shape.

Suggested direction

I am not proposing an implementation in this issue, but the current behavior suggests two design adjustments are needed:

  1. lazycodex-ai doctor should not require hardcoded /tmp; it should honor ${TMPDIR:-/tmp} or an explicit source-root override
  2. source sync and GitHub/network-dependent steps should run on the host side before entering inner codex exec, with the inner doctor reusing already-synced checkouts
  3. aggregate hook validation in lcx-doctor should be aligned with the current aggregate manifest contract, not the old hooks/hooks.json expectation

Repro

  1. Run npx lazycodex-ai doctor
  2. Observe source sync and diagnosis behavior in an environment where:
    • host GitHub access works
    • inner codex exec cannot resolve github.com
  3. Observe that doctor can still flag missing hooks/hooks.json even though the current aggregate manifest intentionally uses direct hook paths

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions