claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[BUG] `/terminal-setup` should ask for permission, not forgiveness

Open MatrixManAtYrService opened this issue 3 months ago • 3 comments

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

It was suggested that I run /terminal-setup, so I did. Without telling what it did, claude created .wezterm.lua. This shadowed .config/wezterm/wezterm.lua thereby reverting my customizations. It took a while to figure out what had happened.

What Should Happen?

Claude already knows how to show me diffs and ask if they're OK, it should do that in this case so I can say "no" instead of having to go revert the file myself.

Error Messages/Logs


Steps to Reproduce

  1. Run /terminal-setup
  2. Be suprised about what was changed

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.0.1

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

No response

MatrixManAtYrService avatar Oct 01 '25 19:10 MatrixManAtYrService

I don't use nix, but was still unpleasantly surprised to discover all of my custom key bindings/assignments defined in my .wezterm.lua was overridden by changes introduced after running /terminal-setup.

imo, /terminal-setup should respect existing configurations.

darksinge avatar Oct 08 '25 22:10 darksinge

In the case of wezterm, there's a whole precedence system for how to find the config file: https://wezterm.org/config/files.html

In my case the workaround was to simply delete the .wezterm.lua which claude had created. This caused my actual config to be found instead. I realize that it might be challenging to support merging claude's configs with a user's custom configs, so in the near term "ask first" is all I'm shooting for.

MatrixManAtYrService avatar Oct 15 '25 22:10 MatrixManAtYrService

+1 here; I've been going nuts trying to figure this out, the config dropped in my CC is:

config.keys = {
  {key="Enter", mods="SHIFT", action=wezterm.action{SendString="\x1b\r"}},
}

I've appended this to my actual config out of an abundance of caution, and removed the offending file. Note this requires a restart of wezterm - which can be a PITA - and so you should background/tmux anything you need to persist.

mikewaters avatar Dec 04 '25 20:12 mikewaters