You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ralphex-fe: rtk is never initialized when the container runs without /mnt/claude #128
The rtk block sits inside the /mnt/claude guard. Until #125 the comment above it claimed the opposite:
Host mount usually brings the hook, but init idempotently to cover standalone usage (no host mount).
Standalone usage is exactly the case where /mnt/claude is absent, so the guard is false and rtk init never runs. A ralphex-fe container started without the host ~/.claude mount gets no PreToolUse rewrite hook at all — rtk is installed in the image (ralphex-fe/Dockerfile:141) and silently does nothing. No error, no log line: the 2>/dev/null || true on the invocation is moot because the invocation is never reached.
rtk init -g writes into $HOME/.claude and fails if the directory doesn't exist — confirmed locally:
rtk: Failed to create temp file in <HOME>/.claude: No such file or directory (os error 2)
So a correct fix has to hoist the mkdir -p and the chown out of the guard too, which is a behaviour change in the container's startup path. #125 is a docs(rtk): branch and shouldn't carry it.
Suggested fix
Restructure so the ~/.claude directory setup and the rtk init are unconditional, and only the credential/config copying stays behind if [ -d /mnt/claude ]:
Needs verification in an actual standalone ralphex-fe run (no -v ~/.claude:/mnt/claude), checking that /home/app/.claude/settings.json ends up with the rtk hook claude PreToolUse entry and that ownership is still correct.
Note the file header says it was "Copied as-is from umputun/ralphex. Check upstream for updates." — the rtk block is a local addition, so diverging here is fine, but worth keeping the local additions visually separated from the upstream body.
Activity