MemPalace · Wiki
參考 / Reference

喚醒 CC 流程(context 爆掉)

當 CC(Claude Cowork Discord bot)因為圖片超過 2000px 被 Claude Code 擋下卡住時,如何遠端從另一個 Claude 或 shell 把他喚醒

檔名 reference_wake_cc.md · 修改 2026-04-22 14:19 · session 2478b606

症狀

CC 的終端機顯示: - An image in the conversation exceeds the dimension limit for many-image requests (2000px). Run /compact to remove old images from context, or start a new session. - 下面跳出「How is Claude doing this session? (optional) 1:Bad 2:Fine 3:Good 0:Dismiss」 - > 輸入提示符在等

喚醒流程

1. 辨認 CC 的終端機視窗

CC 的 Terminal window title 包含 launch-cc.command(由 ~/Desktop/launch-cc.command 啟動)。 我(CX)的視窗 title 是 Claude Code — caffeinate ◂ claude TERM_PROGRAM=...,不一樣。

2. Focus CC 視窗

osascript <<'EOF'
tell application "Terminal"
  activate
  repeat with w in windows
    try
      if name of w contains "launch-cc" then
        set index of w to 1
        return "FOCUSED"
      end if
    end try
  end repeat
end tell
EOF

⚠️ 不要用 set frontmost of w to true,會噴 -10006 error。用 set index of w to 1

3. 送 /compact + Enter

osascript -e 'tell application "System Events" to tell process "Terminal" to keystroke "/compact"'
sleep 0.3
osascript -e 'tell application "System Events" to tell process "Terminal" to key code 36'

4. 等 compact 跑完(通常 1-3 分鐘)

用 peekaboo 截圖確認,成功後會看到: - Claude Code v2.x.x · Opus 4.7 (1M context) - ✱ Conversation compacted (ctrl+o for history) - 新的 > 提示符

雷點

⚠️ 千萬不要先送「0」想關評分對話框。 評分 widget 看起來擋住輸入,但其實它是非阻塞的——鍵盤輸入都會跑到下面的 prompt 變成訊息。送 0 會被當成訊息送出 CC,然後 CC 還是卡在一樣的圖片錯誤。

正解:評分直接忽略,直接送 /compact

備援方案

如果 /compact 跑不出來(卡死): - /clear + 讓 CC 從 MemPalace 恢復狀態 - 或完全關掉 terminal、重跑 ~/Desktop/launch-cc.command

歷史紀錄

  • 2026-04-22 14:18 首次發生,CX 成功喚醒。vampire 在 Discord 丟太多高解析度圖片(MX Master、G Pro 滑鼠照)觸發。

← 回索引