Skip to content

Codex Desktop WSL hooks silently fail when uv is installed in ~/.local/bin #1499

Description

@codex-corp

Summary

Basic Memory Codex hooks silently fail in Codex Desktop on WSL when uv is installed at the documented Linux user location (~/.local/bin/uv), because the Desktop hook environment does not include ~/.local/bin in PATH.

The same plugin hooks work from codex-tui.

Environment

  • Codex Desktop / CLI version: 0.153.4
  • Basic Memory Codex plugin: 0.23.2
  • Platform: Codex Desktop on Windows with a WSL project
  • uv: 0.12.0, installed at ~/.local/bin/uv
  • Basic Memory setting: checkpointOnCompact: true

Observed behavior

  1. Start a new Codex Desktop task in the WSL repository.
  2. Confirm the Basic Memory plugin and its SessionStart and PreCompact hooks are enabled and trusted.
  3. Trigger compaction.
  4. The rollout records a compacted event, but no Basic Memory hooks.additional_context is injected.
  5. No checkpoint is created. Other hooks, such as Ponytail, still execute.

The same test in codex-tui injects both the initial Basic Memory context and the post-compaction instruction beginning Basic Memory checkpoint required after compaction, after which a coding_session checkpoint with trigger: compact is created.

Root cause evidence

The plugin hook manifest invokes bare uv:

uv run --quiet --script "${PLUGIN_ROOT}/hooks/session_start.py"

The Codex Desktop WSL execution PATH contained /usr/local/bin but not ~/.local/bin. Therefore uv could not be resolved. The hook fails open, so the failure produced no visible diagnostic and the task continued without Basic Memory context.

A direct hook probe worked from an interactive shell where ~/.local/bin was present.

Confirmed workaround

sudo ln -s /home/<user>/.local/bin/uv /usr/local/bin/uv

After fully restarting Codex Desktop and creating a new task:

  • Basic Memory SessionStart context was injected.
  • The post-compaction bm-checkpoint instruction was injected.
  • A new coding_session checkpoint with trigger: compact was created successfully.

Expected behavior

The Codex plugin should either:

  1. Reliably locate uv when installed using the documented Linux installer, including Codex Desktop WSL environments; or
  2. Surface a clear diagnostic when uv is unavailable to the hook process and document the /usr/local/bin workaround.

Fail-open behavior should not make a missing required hook runtime indistinguishable from a successful hook that produced no context.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions