Antigravity 2.0 Auto-Accept Not Working? Fix It with a Developer Tools Script

Unresponsive AI Agents After the Antigravity 2.0 Update

As AI-driven development spaces advance, an increasing number of developers are leveraging the Antigravity IDE to establish automated agentic workflows. It is highly effective for executing remote server coding or managing large-scale build tests. However, following the recent update to Antigravity version 2.0, existing auto-approval extensions—such as ITV Auto-Accept—frequently stop functioning as expected.

When an AI agent needs to execute dozens of commands in the background sequentially, frequent security verification dialogs or directory change approvals can completely stall progress. Returning to a workspace only to find the agent blocked by an initial confirmation prompt disrupts efficiency. This guide offers a reliable workaround to automatically accept these popups using the built-in Developer Tools console without relying on broken external extensions.

Why ITV Auto-Accept Stalls and the Necessity of Automation

Even when the "Always Allow" option is enabled within the Antigravity settings, unique confirmation dialogs often trigger during SSH remote server actions or multi-command script executions. Recent technical workflow studies indicate that enhanced IDE security layers can reduce the efficiency of automated development agents by up to 40% due to these idle waiting periods.

In headless configurations where continuous screen monitoring is impossible, these small validation prompts create substantial friction. If existing tools fail to adapt to the 2.0 architecture, the alternative is to directly traverse the internal rendering tree via code to trigger the approval actions programmatically.

Activating the Antigravity Developer Tools and Console

To resolve this, you must open the internal browser environment window within the IDE. Navigate to the top menu, select Help, and then click Toggle Developer Tools. The familiar Chromium Developer Tools panel will appear on the right side of the interface.

From there, switch to the Console tab. This acts as the backend control panel for the editor, allowing you to interface directly with the running application instance. While this interface is familiar to web developers, injecting code directly into the IDE layout provides a highly direct method of automation.

Bypassing Paste Restrictions and Injecting the JavaScript Code

When attempting to insert scripts into the console for the first time, security restrictions within the IDE may block the input. This is a standard security protocol implemented in recent builds, but it can be bypassed by entering a specific command directly into the console prompt.

💡 Bypassing Console Paste Restrictions Type allow pasting into the console input line and press Enter. This immediately unlocks the restriction, allowing external code blocks to be pasted directly into the prompt.

Once cleared, copy the updated Shadow DOM-compatible auto-approval script provided below, paste it into the console, and hit Enter to run it:


JavaScript
if (window.myTimer) clearInterval(window.myTimer);
window.myTimer = setInterval(() => {
function queryAllElements(root = document, selector = '*') {
let elements = Array.from(root.querySelectorAll(selector));
const activeElements = root.querySelectorAll('*');
for (const el of activeElements) {
if (el.shadowRoot) {
elements = elements.concat(queryAllElements(el.shadowRoot, selector));
}
}
return elements;
}
const allElements = queryAllElements();
const options = allElements.filter(el => {
const tagName = el.tagName.toLowerCase();
const role = el.getAttribute('role') || '';
let className = '';
if (typeof el.className === 'string') {
className = el.className;
} else if (el.className && typeof el.className.baseVal === 'string') {
className = el.className.baseVal;
}
return (
role.includes('option') ||
role.includes('radio') ||
role.includes('listitem') ||
tagName.includes('option') ||
tagName.includes('radio') ||
className.includes('option') ||
className.includes('select-option')
);
});
if (options.length > 0) {
const keywordsPriority = ['always', 'always allow', '평생', '항상'];
const keywordsNormal = ['allow', 'yes', '허용', '동의', '승인'];
let targetOpt = options.find(opt => {
const txt = opt.textContent.trim().toLowerCase();
return keywordsPriority.some(k => txt.includes(k));
});
if (!targetOpt) {
targetOpt = options.find(opt => {
const txt = opt.textContent.trim().toLowerCase();
return keywordsNormal.some(k => txt.includes(k));
});
}
if (targetOpt) {
const isChecked = targetOpt.getAttribute('aria-checked') === 'true' ||
targetOpt.getAttribute('aria-selected') === 'true' ||
targetOpt.getAttribute('checked') !== null ||
targetOpt.classList.contains('selected') ||
targetOpt.classList.contains('active');
if (!isChecked) {
targetOpt.click();
}
const submitBtn = allElements.find(btn => {
const tagName = btn.tagName.toLowerCase();
let isBtnClass = false;
if (typeof btn.className === 'string') {
isBtnClass = btn.className.includes('btn');
} else if (btn.className && typeof btn.className.baseVal === 'string') {
isBtnClass = btn.className.baseVal.includes('btn');
}
const isButton = tagName === 'button' || tagName.includes('button') || isBtnClass;
if (!isButton) return false;
const txt = btn.textContent.trim().toLowerCase();
return ['submit', 'confirm', 'ok', '제출', '확인', '적용'].some(k => txt.includes(k));
});
if (submitBtn) {
submitBtn.click();
}
}
}
}, 1000);

How the Script Operates and Observed Practical Results

The script functions by scanning the internal elements of the IDE every 1000ms (1 second) using a recursive query function. Because the Antigravity 2.0 update encapsulated UI components deep within the Shadow DOM structure, standard query selectors fail to locate them.

This script traverses those hidden nodes, locates checkboxes or options containing target strings like 'always allow', 'allow', or their Korean equivalents, automatically selects them, and clicks the 'Confirm' or 'OK' button. During tests running multi-stage migration scripts, tasks that typically required manual intervention multiple times proceeded entirely without interruption.

Limitations of the Manual Script and Workarounds

While highly effective, this solution does have a practical limitation. Because this script is injected manually into the runtime Developer Tools console rather than functioning as a persistent system extension, the script will clear whenever the Antigravity IDE is restarted or completely reloaded.

To manage this limitation, it is practical to save the script into a local code snippet tool or a text file for quick retrieval. While it requires roughly 10 seconds of initial setup when starting a new workspace session, it effectively prevents automated agent workflows from stalling during extended operations.

Conclusion: Achieving Uninterrupted Automation

The Antigravity 2.0 update introduces strong core performance enhancements but alters compatibility for third-party automation tools. Until an official update is released for community extensions, utilizing this direct console injection script serves as a highly functional workaround. This approach allows developers to bypass continuous validation loops and maintain stable, hands-free automation workflows.

[Core Summary] The Antigravity 2.0 update causes certain automation tools like ITV Auto-Accept to stop processing confirmation prompts. Opening the internal console via Help > Toggle Developer Tools and injecting this Shadow DOM-compliant script allows the system to auto-approve validation prompts every second, restoring continuous background automation.

[Key Keywords] Antigravity 2.0, Auto-Accept Extension, Antigravity IDE, Developer Tools Console

[Hashtags] #Antigravity #AntigravityIDE #AutoApproveScript #ITVAutoAccept #DeveloperTools

ADRYTHING, AD EVERYTHING

ADRYTHING (애드리띵) 세상의 모든 흥미로운 흐름과 가치 있는 지식을 연결하는 공간입니다. 개인 개발 프로젝트 및 웹마스터 가이드를 아카이빙하는 '기술 이야기'와, 지금 이 순간 주목해야 할 '최신 트렌드'를 명확하고 직설적인 시선으로 전합니다.

댓글 쓰기

다음 이전