Skip to content

feat(config): add browser.headed toggle with dashboard UI and AGENT_BROWSER_HEADED wiring - #25653

Closed
Black0Fox0 wants to merge 1 commit into
NousResearch:mainfrom
Black0Fox0:feat/browser-headless-toggle
Closed

feat(config): add browser.headed toggle with dashboard UI and AGENT_BROWSER_HEADED wiring#25653
Black0Fox0 wants to merge 1 commit into
NousResearch:mainfrom
Black0Fox0:feat/browser-headless-toggle

Conversation

@Black0Fox0

@Black0Fox0 Black0Fox0 commented May 14, 2026

Copy link
Copy Markdown

Summary

Add a browser.headed config option (default: false) that controls whether the local Chromium runs in headed (visible window) or headless mode.

Aligns with naming from PR #13433 (headed config key).

Changes

  1. hermes_cli/config.py — Added "headed": False to the browser section of DEFAULT_CONFIG. The dashboard auto-discovers it from the schema.

  2. hermes_cli/web_server.py — Added a schema override with a proper description so the toggle renders correctly in the dashboard browser config section.

  3. tools/browser_tool.py — When headed: true in local (non-CDP/non-Camofox) mode, sets AGENT_BROWSER_HEADED=true in the subprocess environment so agent-browser launches a visible browser window.

Key difference from PR #13433

Testing

  • Dashboard shows "Browser 14" (was 10) in the config page.
  • Searching "headed" finds the browser.headed field with a switch toggle.
  • Toggling on and saving persists headed: true to ~/.hermes/config.yaml.
  • Runtime wiring activates AGENT_BROWSER_HEADED=true on the next browser command (local mode only, not CDP/Camofox).

@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have tool/browser Browser automation (CDP, Playwright) area/config Config system, migrations, profiles comp/cli CLI entry point, hermes_cli/, setup wizard labels May 14, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Overlaps with existing #13433 (feat(browser): add headed mode config for local browser visibility). Both add a headed/headless config toggle for the local browser. This PR additionally wires the dashboard UI and AGENT_BROWSER_HEADED env var.

…ROWSER_HEADED wiring

Add a `browser.headed` config option (default: false) that controls
whether the local Chromium runs in headed (visible) or headless mode.

Changes:
- hermes_cli/config.py: Add "headed": False to the browser section
  of DEFAULT_CONFIG — the dashboard auto-discovers it from the schema.
- hermes_cli/web_server.py: Add schema override so the toggle renders
  with a proper description in the dashboard browser config section.
- tools/browser_tool.py: When headed=true in local (non-CDP/non-Camofox)
  mode, set AGENT_BROWSER_HEADED=true so agent-browser launches a visible
  browser window.

The toggle appears at /config in the Browser section (now 11 fields).
Aligns with PR NousResearch#13433 naming convention (headed config key).
@Black0Fox0
Black0Fox0 force-pushed the feat/browser-headless-toggle branch from e6b229d to 83b369a Compare May 14, 2026 11:35
@Black0Fox0 Black0Fox0 changed the title feat(config): add browser.headless toggle with dashboard UI and AGENT_BROWSER_HEADED wiring feat(config): add browser.headed toggle with dashboard UI and AGENT_BROWSER_HEADED wiring May 14, 2026
@alt-glitch alt-glitch added the comp/dashboard Web dashboard / control panel UI (dashboard/, landing) label Jun 26, 2026

@teknium1 teknium1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for carrying the headed-mode configuration through the dashboard and local subprocess path. The feature remains needed on current main: hermes_cli/config.py:1267-1305 has no browser.headed option, while tools/browser_tool.py:2381-2450 is the live environment/spawn path.

Problems

  • The PR changes no tests, although its behavior is an environment mutation immediately before subprocess.Popen; existing runner-path tests are under tests/tools/test_browser_lightpanda.py.
  • website/docs/user-guide/configuration.md:1772-1789 documents the browser config block but would not document the new setting.
  • The new raw-config condition uses Python truthiness. read_raw_config() intentionally returns raw YAML (hermes_cli/config.py:6642-6648), so headed: "false" would be truthy. Existing boolean-like browser config uses is_truthy_value at tools/browser_tool.py:3457-3460.

Suggested changes

  • Add local/CDP/Camofox environment-wiring tests.
  • Normalize the raw value with is_truthy_value.
  • Document the setting and its local-only scope.

Automated hermes-sweeper review.

Comment thread tools/browser_tool.py
try:
from hermes_cli.config import read_raw_config
_cfg = read_raw_config()
if _cfg.get("browser", {}).get("headed", False):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

read_raw_config() returns unvalidated YAML, so a manually written headed: "false" is truthy and enables headed mode. Please use the existing is_truthy_value helper (as in the browser unsafe-evaluate setting) and add a regression test.

@teknium1 teknium1 added sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform labels Jul 13, 2026
@teknium1

Copy link
Copy Markdown
Contributor

Partially merged, remainder in flight — closing this PR in favor of the two pieces:

Thanks — the dashboard toggle was the piece nobody else in this cluster thought of.

@teknium1 teknium1 closed this Jul 18, 2026
teknium1 pushed a commit that referenced this pull request Jul 18, 2026
Salvaged from PR #25653 by @Black0Fox0 — the config-key and env-wiring
halves of that PR landed via #67018; this carries the surviving dashboard
schema override so browser.headed renders as a labeled boolean toggle.
Description updated to reflect the merged cleanup-skip behavior.
randlee pushed a commit to randlee/hermes-agent that referenced this pull request Aug 11, 2026
Salvaged from PR NousResearch#25653 by @Black0Fox0 — the config-key and env-wiring
halves of that PR landed via NousResearch#67018; this carries the surviving dashboard
schema override so browser.headed renders as a labeled boolean toggle.
Description updated to reflect the merged cleanup-skip behavior.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/config Config system, migrations, profiles comp/cli CLI entry point, hermes_cli/, setup wizard comp/dashboard Web dashboard / control panel UI (dashboard/, landing) P3 Low — cosmetic, nice to have sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades tool/browser Browser automation (CDP, Playwright) type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants