Skip to content

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

Closed

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

  1. phernandez commented on Sep 7, 2026

    @phernandez
    Member

    Thanks for the detailed reproduction and the Desktop-versus-TUI comparison. uv is a required prerequisite for this plugin. The actionable distinction here is that it can be installed successfully but unavailable on the Desktop hook process's PATH.

    Our manifest invokes bare uv, so in that case the Python hook never starts and cannot report the missing runtime itself. We should reproduce the launcher with a PATH that excludes ~/.local/bin, compare it with an absolute-path invocation using the same payload, and verify the actual Desktop hook environment. The scope should stay on prerequisite discovery/diagnostics and setup guidance, with a clear indication when uv cannot be resolved.

    The symlink workaround is useful evidence. Final verification should check both startup context and an actual post-compaction checkpoint in Desktop, rather than only a successful exit status.

  2. added this to the v0.24.0 milestone on Sep 8, 2026
  3. phernandez commented on Sep 8, 2026

    @phernandez
    Member

    PR #1511 adds the WSL prerequisite diagnosis and confirmed symlink workaround, and teaches bm-status to distinguish shell uv visibility from verified Desktop hook execution. Package checks and Codex review pass. It deliberately leaves this issue open: the actual Desktop/WSL startup context and authored post-compaction checkpoint still need verification; the implementation environment for this PR is macOS.

  4. phernandez commented on Sep 14, 2026

    @phernandez
    Member

    Closing as done for the supported scope. #1511 documents the Codex Desktop WSL failure mode, diagnosis, and working configuration. We are not holding this open for an additional WSL test-environment installation.

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

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions