Skip to content

Clicking “Edit” freezes Claude Code

Quick fix

On Linux, switch to the deb package, or fix the GTK input-method cache in AppImage to prevent fallback to XIM.

Error output
进入编辑页后整体卡死:窗口无响应,进程存活,CPU 正常(非死循环)。
English translation

After entering the editor page, the entire application freezes: the window is unresponsive, the process remains alive, and CPU usage is normal (not an infinite loop).

The Linux AppImage AppRun unconditionally sets `GTK_IM_MODULE_FILE`, but its referenced bundle cache lacks fcitx or ibus input-method modules, and AppDir also has no `immodules/` directory. When the environment uses `GTK_IM_MODULE=fcitx`, GTK cannot find the module in the cache and falls back to XIM (`im-xim.so`) based on the current locale.

When an editor text box receives focus, WebKitGTK freezes on this XIM path. The report's single-variable comparison shows the freeze disappears as long as GTK no longer falls back to XIM, even without changing the bundled WebKit. System GTK modules may have an ABI mismatch with the GTK version inside AppImage, so do not assume the system `im-fcitx5.so` can be reused directly.

  1. Prefer running cc-switch with the deb package; the report shows it loads the system fcitx5 input-method module normally and the editor page does not freeze.

  2. If AppImage is required, unpack it and repair the GTK input-method module cache in AppDir: do not let `GTK_IM_MODULE_FILE` point to a cache missing common input-method modules. If retaining the bundled cache, build and add `im-fcitx5.so` or `im-ibus.so` for the GTK version in the bundle, then regenerate the matching cache.

    AppImage AppRun
    export GTK_IM_MODULE_FILE="$APPDIR//usr/lib/gtk-3.0/3.0.0/immodules.cache"
  3. Alternatively, do not set `GTK_IM_MODULE_FILE`, and let GTK use the system cache.

ToolClaude Code
Versioncc-switch 3.20.3 AppImage
PlatformsLinux
Why is setting `GTK_IM_MODULE_FILE` again in `.desktop` ineffective?
AppImage's `AppRun` unconditionally exports this environment variable, so a value set later by the user cannot override it.
Can setting `GTK_IM_MODULE=xim QT_IM_MODULE=xim` to XIM rule out input-method involvement?
No. This setting actively enters the XIM path, which is consistent with the conclusion that XIM triggers the freeze.
Can I put the system `im-fcitx5.so` directly into AppImage?
Not necessarily. In the report, `im-fcitx5.so` from system GTK 3.24.41 failed to load with bundled GTK 3.24.33; use a module built for the GTK version inside the bundle.

This is an unofficial community wiki with no affiliation to the cc-switch authors or the project itself. Its content is compiled from the project's public GitHub issues. This site distributes no software.