fix(cli): stop sending the retired hidden input to tabs/windows - #2418
Open
Athul Nambiar (athul-22) wants to merge 1 commit into
Open
fix(cli): stop sending the retired hidden input to tabs/windows#2418Athul Nambiar (athul-22) wants to merge 1 commit into
Athul Nambiar (athul-22) wants to merge 1 commit into
Conversation
The server retired the `hidden` input, but the CLI still sent it. Both
tool schemas use `deny_unknown_fields` and `pages.newPage` rejects the
option outright, so every `open` code path failed:
- `open` -> `tabs` action=new sent `hidden` -> "Invalid arguments for
tabs: hidden: unknown field `hidden`"
- `open --window N` -> `browser.pages.newPage(url, { hidden, ... })` ->
"pages.newPage: hidden is no longer supported"
- `window create` -> `windows` action=create sent `hidden` -> "Invalid
arguments for windows: hidden: unknown field `hidden`"
Drop the `hidden` arg and the `--hidden` flag from `open` and
`window create`, matching the compact MCP surface the CLI is meant to
track. `tabs` action=new already returns `{ "page": <id> }`, so
`open --json` emits the documented `page` field again once the call
succeeds.
Fixes browseros-ai#2161
Fixes browseros-ai#2162
Contributor
|
PR author is not in the allowed authors list. |
Contributor
|
All contributors have signed the CLA. Thank you! |
Contributor
Author
|
I have read the CLA Document and I hereby sign the CLA |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
browseros-cli openis broken on every code path because the CLI still sends thehiddeninput that the server retired.Both tool schemas are
#[serde(deny_unknown_fields)]andpages.newPagerejects the option explicitly, so the call fails before a tab is ever opened:open→tabsaction=new"hidden": falseInvalid arguments for tabs: hidden: unknown field `hidden`open --window N→browser.pages.newPage(url, { hidden, … })hidden: falsepages.newPage: hidden is no longer supportedwindow create→windowsaction=create"hidden": falseInvalid arguments for windows: hidden: unknown field `hidden`The retirement is intentional and pinned by the server's own tests —
retired_hidden_inputs_are_rejectedandtab_and_window_schemas_omit_hidden_controlsincrates/browseros-mcp/src/tests.rs. Only the Go CLI was left behind.Fix
Drop the
hiddenargument and the--hiddenflag fromopenandwindow create, per the rule inapps/cli/CLAUDE.md:This also fixes #2162
open --jsonwas reported as returning{"url":"…"}with nopage. That was a symptom, not a second bug —tabsaction=new already returns{ "page": <id> }(tools/tabs.rs), andopenResultalready maps it (cmd/open.go). The field was missing only because the call never succeeded. Withhiddengone,open --jsonemits the documented shape again:{"page":123,"url":"https://example.com"}which is what
cmd/llm_txt.mdtells agents to rely on:Changes
cmd/open.go— removehiddenfromopenTabsToolArgsandopenInWindowCode; drop the--hiddenflagcmd/window.go— removehiddenfromwindow create; drop the--hiddenflagcmd/tool_mapping_test.go— update the two mapping tests, plus a guard assertingopenInWindowCodenever re-introduceshiddencmd/llm_txt.md,README.md,CHANGELOG.md— drop the stale--hiddenreferencesVerification
Per
apps/cli/CLAUDE.md, run fromapps/cli/:--hiddenis gone from both help outputs:Noted, not addressed
browseros-cli window activate <id>(cmd/window.go) sendsaction: "activate", butWindowsActionintentionally omitsActivate("so MCP callers cannot steal window focus"), so that subcommand is dead too. Removing a user-facing command felt like a maintainer call rather than part of this fix — happy to fold it in or open a separate issue, whichever you prefer.Fixes #2161
Fixes #2162