Skip to content

install.sh creates symlink pointing to /tmp — breaks after reboot #3

Open

Description

@mgoulart

Problem

The install.sh script clones the repo to whatever directory the user runs it from, then creates a symlink from ~/.claude/plugins/codex-subagents pointing to that location.

If the user follows the typical flow of cloning to /tmp (or the script is run from a temp directory), the symlink ends up pointing to /tmp/claudecode-codex-subagents:

lrwxr-xr-x  ~/.claude/plugins/codex-subagents -> /tmp/claudecode-codex-subagents

/tmp is cleared on reboot on macOS and Linux, which silently breaks the plugin after the next restart — with no error message explaining why.

Steps to reproduce

cd /tmp
git clone https://github.com/CoderMageFox/claudecode-codex-subagents.git
bash claudecode-codex-subagents/install.sh
# reboot
# plugin is now broken

Suggested fix

The install script should either:

  1. Clone to a permanent location itself (e.g. ~/.claude/plugins/codex-subagents-src) and symlink from there, regardless of where the script is invoked from.
  2. Copy the files instead of symlinking, so the install is self-contained.
  3. Warn the user if SCRIPT_DIR resolves to a path under /tmp or another volatile directory.

Option 1 is the cleanest. Something like:

INSTALL_SRC="$HOME/.claude/plugins/codex-subagents-src"
git clone https://github.com/CoderMageFox/claudecode-codex-subagents.git "$INSTALL_SRC"
ln -s "$INSTALL_SRC" "$PLUGINS_DIR/codex-subagents"

Environment

  • macOS 14 (Darwin 24.6.0)
  • Claude Code CLI

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions