Conversation
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4dffc29a80
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // } catch { /* provider not ready yet — use full prompt */ } | ||
| try { | ||
| const provider = this.providerManager.getActive(); | ||
| if (provider.useCompactPrompt) return SYSTEM_PROMPT_ACT_COMPACT; |
There was a problem hiding this comment.
Keep compact mode opt-in for llama.cpp defaults
This re-enables compact mode based on provider.useCompactPrompt, but the default llama.cpp provider still evaluates that flag to true when useCompactPrompt is unset (src/chrome/src/providers/llamacpp.js), while default configs do not set the key (src/chrome/src/providers/manager.js). The result is that fresh/default llama.cpp setups run compact mode even with an unchecked checkbox, silently reducing the tool schema and changing behavior from the documented opt-in flow.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed — llamacpp.js had useCompactPrompt !== false which defaulted to true when unset. Changed to !!this.config.useCompactPrompt so it's explicit opt-in only, matching openai.js and base.js.
| 'navigate', 'new_tab', 'wait_for_element', | ||
| 'fetch_url', 'download_social_media', | ||
| 'scratchpad_write', 'clarify', 'done', | ||
| ]); |
There was a problem hiding this comment.
Keep solve_captcha available in compact tool mode
The compact whitelist removes solve_captcha, but the ACT system prompt builder still appends guidance to call solve_captcha whenever CapSolver is enabled (_buildSystemPrompt in agent.js). In compact mode this creates a prompt/schema mismatch where the model is instructed to call a tool that is not exposed, which can stall or fail CAPTCHA-gated automations.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed — added solve_captcha to COMPACT_TOOL_NAMES so it's available when CapSolver is configured.
- llamacpp.js defaulted useCompactPrompt to true when unset — fixed - solve_captcha added to COMPACT_TOOL_NAMES to match system prompt guidance Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
@codex pls check again |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0c71e8fb54
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| const provider = this.providerManager.getActive(); | ||
| const tools = getToolsForMode(mode, { strictSecretMode: this.strictSecretMode }); | ||
| const tools = getToolsForMode(mode, { strictSecretMode: this.strictSecretMode, compact: provider.useCompactPrompt }); |
There was a problem hiding this comment.
Enforce compact allowlist for text-parsed tool calls
Passing compact: provider.useCompactPrompt here only limits the schema sent to providers that return structured tool_calls; when a local model emits text-form calls, _tryParseToolCallsFromText() still accepts any name in AGENT_TOOL_NAMES and executes it, so compact mode can invoke tools outside COMPACT_TOOL_NAMES (e.g., upload_file, download_file). This breaks the new compact-mode contract specifically on the small local models this change targets, and can reintroduce the high-surface behavior the commit is trying to remove.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed — _tryParseToolCallsFromText now takes an allowedNames parameter (defaults to AGENT_TOOL_NAMES). Both call sites pass COMPACT_TOOL_NAMES when the provider has compact mode enabled, so text-parsed tool calls are restricted to the same 20-tool allowlist as the structured schema.
download_files now accepts a single url string or an array. Removes one tool from the schema, reducing decision surface for the LLM. The old download_file name is still handled as an alias in agent.js for backward compatibility with cached conversations. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
_tryParseToolCallsFromText now accepts an allowedNames set. In compact mode, only COMPACT_TOOL_NAMES are accepted from text-form tool calls, preventing small local models from invoking tools outside the compact schema. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
@codex pls check again and let me know if it's ready to merge |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 84744c5be1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (name === 'download_files' || name === 'download_file') { | ||
| if (args.url && !args.urls) args.urls = [args.url]; | ||
| return await downloadFiles(args); |
There was a problem hiding this comment.
Preserve filename when routing single-file downloads
This branch now routes both download_file and download_files through downloadFiles(args), but that implementation does not consume args.filename (it only downloads by URL), so single-file calls that provide filename silently ignore the requested save name. This is a functional regression from the previous download_file path (which passed filename through) and conflicts with the updated tool schema that explicitly documents filename support for single-URL downloads.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed — downloadFiles now passes args.filename to chrome.downloads.download when it's a single-URL call. The filename is applied to the first (only) download in the batch.
| // using the structured tool_calls field, try to parse them out. | ||
| if ((!result.toolCalls || result.toolCalls.length === 0) && result.content) { | ||
| const fallback = this._tryParseToolCallsFromText(result.content); | ||
| const fallback = this._tryParseToolCallsFromText(result.content, provider.useCompactPrompt ? COMPACT_TOOL_NAMES : undefined); |
There was a problem hiding this comment.
Parse text fallback against active tool schema, not compact list
When compact mode is enabled, text fallback parsing is hard-restricted to COMPACT_TOOL_NAMES, but ask-mode tool exposure still comes from ASK_ONLY_TOOLS in getToolsForMode(mode==='ask') and includes tools outside the compact set (for example read_pdf, research_url, list_downloads). For local models that emit raw-text tool calls (the exact case this fallback handles), valid ask-mode calls to those tools will be dropped, causing avoidable no-op turns.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed — compact allowlist is now only applied to the text fallback parser in Act mode (mode === 'act' && provider.useCompactPrompt). Ask mode uses the full AGENT_TOOL_NAMES set regardless of compact setting, so read_pdf, research_url, list_downloads etc. remain reachable.
… mode - downloadFiles now passes args.filename to chrome.downloads for single-URL calls - Text fallback parser only applies compact allowlist in Act mode, so Ask mode tools (read_pdf, research_url, list_downloads) remain reachable for local models Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
@codex pls check again and let me know if it's ready to merge |
|
Codex Review: Didn't find any major issues. Keep them coming! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Skip planner for short follow-up turns
Summary
Changes
COMPACT_TOOL_NAMESset (20 tools), rewrittenSYSTEM_PROMPT_ACT_COMPACT, updatedgetToolsForMode()to filter tools when compact is active_getActPrompt()compact selection, passcompactflag togetToolsForMode()Test plan
set_field/click_axpattern🤖 Generated with Claude Code