Skip to content

rtk init --opencode appears to skip Claude hook installation #4046

Closed

Description

@cecton

When running:

rtk init -g --opencode

I expected it to install the Claude Code hook and the OpenCode plugin, since the flag says “Install OpenCode plugin (in addition to Claude Code)”.

Actual behavior:

  • OpenCode plugin was installed globally
  • No Claude hook was installed
  • Running rtk init -g separately was still required to register the Claude hook

Expected behavior:
--opencode should add OpenCode support in addition to the Claude Code setup, or the help text should be updated to make it clear that it changes the install flow.

Repro:

rtk init -g --opencode

Demo:

[0] [07:14:36] ~ > rtk init --help
Initialize rtk instructions for assistant CLI usage

Usage: rtk init [OPTIONS]

Options:
  -g, --global
          Add to global assistant config directory instead of local project file

      --opencode
          Install OpenCode plugin (in addition to Claude Code)
[...]
[0] [07:14:59] ~ > rtk init -g --opencode
[rtk] /!\ No hook installed — run `rtk init -g` for automatic token savings

OpenCode plugin installed (global).

  OpenCode: /home/cecile/.config/opencode/plugins/rtk.ts
  Restart OpenCode. Test with: git status


[0] [07:15:17] ~ > rtk init -g

RTK hook registered (global).

  Command:   rtk hook claude
  RTK.md:    /home/cecile/.claude/RTK.md (10 lines)
  CLAUDE.md: @RTK.md reference added

Patch existing /home/cecile/.claude/settings.json? [y/N] 
y

  settings.json: hook added
  Backup: /home/cecile/.claude/settings.json.bak
  Restart Claude Code. Test with: git status
  filters:   /home/cecile/.config/rtk/filters.toml (template, edit to add user-global filters)

Activity

  1. added
    bug
    good first issue
    on Sep 14, 2026
  2. rtk-wshm-sync-bot commented on Sep 14, 2026

    @rtk-wshm-sync-bot

    wshm · Automated triage by AI

    🔍 Automated Triage

    🐛 Category bug
    🟡 Priority medium
    🎯 Confidence 87%

    Summary

    rtk init -g --opencode installs only the OpenCode plugin and skips Claude hook registration, contradicting the flag's stated 'in addition to Claude Code' behavior; either fix the install flow to install both, or clarify the help text.

    This looks like a simple fix that could be auto-resolved. Repo maintainers can use /wshm fix to attempt it.

    📁 Relevant files
    • src/init.rs

    Triaged automatically by wshm · This is an automated analysis, not a human review.

  3. TechWizard9999 commented on Sep 14, 2026

    @TechWizard9999
    Contributor

    @KuSh Could you please assign it to me ?

  4. added a commit that references this issue on Sep 14, 2026
    43f078e
  5. TechWizard9999 commented on Sep 15, 2026

    @TechWizard9999
    Contributor

    Hi @KuSh , I have made changes please review it

  6. added a commit that references this issue on Oct 3, 2026
    b931928
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area:clibuggood first issuepriority:medium

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions