Switch to Claude Opus 4.6 (Thinking)
This workflow triggers the automated engine handover to Claude Opus 4.6 (Thinking).
[!WARNING] INVOCATION GATE: Do NOT execute this workflow on your own initiative. It may ONLY be invoked in two cases: (1) another workflow's step explicitly references it (e.g., "Execute the steps in the switch-to-claude-opus-4.6-thinking workflow"), or (2) the user explicitly types
switch-to-claude-opus-4.6-thinking.mdor equivalent. If the user casually says "have Claude review this", do NOT auto-invoke this workflow ā the user will switch manually. When in doubt, ask.
[!CAUTION] The automated engine switch requires the Antigravity UI to be visible and in the foreground. āš“ Make absolutely SURE that NO other Antigravity windows (such as Agent Manager or other workspaces) are open, or the switch sequence WILL misfire. š“ā If the window is hidden behind Chrome or minimized, the automation script will fail. Do not click away during the handover!
- Verify Current Engine: Check if you are already Claude. If so, inform the user and abort. Check if a
USER_SETTINGS_CHANGEappeared earlier in this conversation to determine your current engine. If none exists, check your self-knowledge (training identity). If still uncertain, ask the user. - Verify CDP debugging port: Execute
pythonswitch_to_other.py--checksynchronously.- If the port check succeeds (exit code 0):
- Play audio alert: Run
pythonaudio_alert.py"Switching engine". - Run CDP switch script (Background): Execute
pythonswitch_to_other.py"Claude Opus 4.6 (Thinking)"withWaitMsBeforeAsync=5to send it to the background. - End Turn immediately: Directly print the following safety warning and "Switching engines..." message to the chat screen: "\n\nāš“ Make absolutely SURE that NO other Antigravity windows (such as Agent Manager or other workspaces) are open, or the switch sequence WILL misfire. š“ā\n\nSwitching engines..." (Do NOT wait for the python script). The script will instantly pause the auto-clicker via the
__switchHandoverActiveflag, wait 15 seconds for the UI to finish syncing files, switch the engine, send a resume prompt, and unpause the auto-clicker.
- Play audio alert: Run
- If the port check fails (exit code 1):
- Directly print the manual instruction alert: šØ CDP Debugging Port Offline ā Manual Switch Required šØ "I cannot switch the model automatically because the IDE's remote debugging port is offline. Please manually switch the model to Claude Opus 4.6 (Thinking) in the top-right model selector dropdown of the IDE, type a message (e.g. 'resume'), and click send to continue the workflow under the new engine."
- End Turn immediately (do NOT run the background script).
- If the port check succeeds (exit code 0):
I. New Engine Wakes Up ā Verification via Metadata
- Check for
USER_SETTINGS_CHANGE: When the new engine wakes up from the auto-resume message, its very first action is to check whether aUSER_SETTINGS_CHANGEblock was injected into the metadata of the message it just received, and specifically verify that it changed the model to "Claude Opus 4.6 (Thinking)".- Present and verified ā The switch succeeded. Proceed immediately to assigned tasks within the parent workflow.
- Absent or wrong model ā The direct switch failed (likely because you were already on Claude). Retry with trampoline: Run
pythonswitch_to_other.py"Claude Opus 4.6 (Thinking)" --trampolinewithWaitMsBeforeAsync=5to send it to the background. The trampoline will first hop to Gemini 3 Flash (sending a "." to commit the change), wait for Flash to finish, then switch to the actual target. Print the same safety warning and "Switching engines..." message, then end your turn.
- Second verification: When the engine wakes up again after the trampoline retry, check for
USER_SETTINGS_CHANGEagain.- Present and verified ā The switch succeeded. Proceed immediately to assigned tasks.
- Absent or wrong model ā The switch failed twice. Stop all work, run
pythonaudio_alert.py"Engine switch failed", and warn the user that the engine switch failed.