An agentic browser harness: an AI side panel & orb in your own logged-in Chrome, Edge, Arc, Brave or even Firefox run by the agent/subscription you already use (Claude Code, Codex, Antigravity). Free, open source, no API key. Also an MCP server.
TypeScript agentic-browseragentic-browsingagy-cliaiai-agentai-browser-extensionai-toolsbrave-extensionbrowser-agentbrowser-automationbrowser-extensionbrowser-usebrowserskillchrome-extensionclaude-codecodexfirefox-addonmcp-servernanobrowserweb-automation
fix(agents): let a Codex mapping run search the web it was switched on for, because the browser section forbade the search the site mapper asks it to make
Shahriar0960eebe8fca
diff --git a/src/daemon/agent/runners/codex.test.ts b/src/daemon/agent/runners/codex.test.tsindex dab0931..7c146a0 100644--- a/src/daemon/agent/runners/codex.test.ts+++ b/src/daemon/agent/runners/codex.test.ts@@ -112,6 +112,11 @@ describe('a streamed run', () => {expect(instructions).toMatch(/never answer from memory/i);});+ // A mapping run is asked to research the domain, so its prompt cannot also forbid the search.+ test('a research run may search the web for background, and any other run is told not to', () => {+ expect([stream({ research: true }).args, stream().args].map((args) => instructionsIn(args).includes('from a web search'))).toEqual([false, true]);+ });+test('the chosen model and effort are passed through', () => {const args = codexRunner.stream(streamContext({ bin: 'codex', model: 'gpt-5.4', effort: 'xhigh' })).args;expect([args[args.indexOf('--model') + 1], args.find((arg) => arg.startsWith('model_reasoning_effort='))]).toEqual([diff --git a/src/daemon/agent/runners/codex.ts b/src/daemon/agent/runners/codex.tsindex 9cc0b6e..00a07ef 100644--- a/src/daemon/agent/runners/codex.ts+++ b/src/daemon/agent/runners/codex.ts@@ -45,11 +45,11 @@ const searching = (research: boolean): string[] => ['-c', `web_search=${tomlStri* say so watches the model answer from memory or a web search, because those it can see. Codex* also cuts a tool result at about 10,000 tokens, which a whole-page snapshot passes.*/-const REACHING_THE_BROWSER = `# Reaching the browser from Codex+const reachingTheBrowser = (research: boolean) => `# Reaching the browser from CodexYour browsentic tools are not in your tool list yet, because Codex defers them. Before you plan anything, call \`tool_search\` for what this job needs — query "browsentic page", limit 20 — and search again for a tool you have not loaded. If the only way you can call a tool is \`exec\`, the same tools are there as \`tools.mcp__browsentic__<name>({ ... })\`: find them by filtering \`ALL_TOOLS\`, and pass a screenshot on with \`image(result.content[0])\`, because \`text()\` alone drops the picture.-The page the user means is the one open in their browser. Read it with these tools. Never answer from memory, from a web search, or by fetching the page from the shell.+The page the user means is the one open in their browser. Read it with these tools. Never answer from memory${research ? '' : ', from a web search,'} or by fetching the page from the shell${research ? ', and keep a web search to background the page cannot give you' : ''}.Codex truncates a tool result over roughly 10,000 tokens, so ask for less at a time — \`page_getPageInfo\` with a small \`maxPerKind\`, \`page_extractText\` with the cursor it hands back — rather than one large read whose middle goes missing.`;@@ -126,7 +126,7 @@ export const codexRunner: Runner = {'-c',`${server}.default_tools_approval_mode="approve"`,'-c',- `developer_instructions=${tomlString(`${context.systemPrompt.trim()}\n\n${REACHING_THE_BROWSER}`)}`,+ `developer_instructions=${tomlString(`${context.systemPrompt.trim()}\n\n${reachingTheBrowser(research)}`)}`,...searching(research),...(settings.model ? ['--model', settings.model] : []),...(effort ? ['-c', `model_reasoning_effort=${tomlString(effort)}`] : []),