Skip to content

feat!: remove rtk from all images - #241

Merged
gatezh merged 2 commits into
chore/alpine-3.24from
feat/remove-rtk
Oct 22, 2026
Merged

gatezh merged 2 commits into
chore/alpine-3.24from
feat/remove-rtk

Conversation

@gatezh

@gatezh gatezh commented Oct 22, 2026 •

Copy link
Copy Markdown
Owner

What

Removes rtk from the claude-code (both targets), ralphex-fe and repo devcontainer images. The image itself cleans up the hook rtk left in existing ~/.claude volumes.

Why

rtk rewrote the agent's shell commands (ls → rtk ls) to compress their output. The token savings come with a correctness cost: rtk's open issues include several reports of output that is silently truncated or changed, which the agent then treats as complete:

  • rtk-ai/rtk#4559 (high priority): rtk grep caps results at 50 without saying so, and gives -c, -l and -m different meanings from grep. rtk git status showed 10 of 126 files.
  • #4098: "output capped" lines are unrecoverable.
  • #3985 (high priority): rtk go test -v drops passing-test output.
  • #4207: grep … | head returns different lines than the command asked for.

Changes

  • Dockerfiles: the rtk-download stage and its COPY are removed from claude-code, ralphex-fe and .devcontainer.
  • Renovate: rtk-ai/rtk leaves the "devcontainer tools" group.
  • CI: rtk --version leaves verify-image.sh and the ralphex-fe verify string.
  • Leftover hook, claude-code: /usr/local/bin/drop-rtk-hook runs as a second managed SessionStart hook. It removes only the rtk hook claude / rtk-rewrite.sh PreToolUse entries from ~/.claude/settings.json and keeps every other hook. Every project gets it on its next session after pulling the image, with no template change. It's silent, because SessionStart stdout goes into Claude's context. Delete it after 2027-01-31.
  • Leftover hook, elsewhere: the repo's .devcontainer/init-plugins.sh has the same cleanup inline. ralphex-fe/init-docker.sh strips a host rtk hook from its copy of settings.json; the host file is untouched.
  • devcontainer-browser skill: plain find … -not -path '*/node_modules/*'. The | grep -v workaround existed only because rtk rejected compound find predicates.
  • Docs: READMEs no longer list rtk. claude-code's README has an "Upgrading from an image with rtk" note. ralphex-fe's tool table says "pinned ARG, Renovate" instead of hand-typed versions (they were stale: Bun 1.4.2, Hugo 0.166.0, Claude Code 2.1.280), and lists the Docker CLI it was missing.

Notes

  • Probe: rtk 1.0.1's init -g --hook-only --auto-patch writes exactly one entry, PreToolUse {"matcher":"Bash","command":"rtk hook claude"}. The cleanup removes it and keeps an unrelated hook. It's silent and a no-op on a missing file or a second run (tested in debian:trixie-slim).
  • Until the first session after the pull, Bash calls log a non-blocking hook error.
  • Wiki: Troubleshooting, Image Tags and Rebuild Policy and Choosing an Image still describe rtk. The update is prepared and is pushed when the stack merges.
  • Stack: sits on chore: track Alpine with Renovate (3.21 → 3.24) and hold majors for review #240.

rtk rewrote the agent's shell commands to compress their output. Its filters
have open reports of silently truncated or lossy output (rtk-ai/rtk#4559,
own limits are enough here.

- Drop the rtk download stage and binary from claude-code, ralphex-fe and the
  repo's own devcontainer, its Renovate entry, and the CI version checks.
- init-plugins.sh (both) replaces `rtk init` with a transitional cleanup that
  removes the `rtk hook claude` entry earlier runs left in ~/.claude, which
  would otherwise error on every Bash call.
- ralphex-fe strips a host rtk hook from its copy of the host settings.json.
- devcontainer-browser skill: plain `find -not -path`, now that rtk no longer
  rejects compound predicates.
…template

The cleanup lived in init-plugins.sh, so it reached only projects that
re-copied the template and re-ran it: in the default variant that's a manual
step, and until then every Bash call logged a hook error. It now runs as a
second managed SessionStart hook (/usr/local/bin/drop-rtk-hook), which every
project gets on its next session after pulling the image. The script is
silent because SessionStart stdout goes into Claude's context. Delete it and
its hook after 2027-01-31.

ralphex-fe's tool table listed hand-typed versions that Renovate bumps never
touched (Bun 1.4.2, Hugo 0.166.0, Claude Code 2.1.280). It now says which
tools are Renovate-pinned instead, and lists the Docker CLI it was missing.
@gatezh
gatezh changed the base branch from master to chore/alpine-3.24 October 22, 2026 22:45
@gatezh
gatezh added this pull request to stack #244 October 22, 2026 22:46
@gatezh
gatezh merged commit e4fbd28 into master Oct 22, 2026
20 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant