Skip to content

feat(cli): add browser_task tool - #5

Open
iscekic wants to merge 6 commits into
kwf-bench-basefrom
kwf/deliver-the-work-described-b-eed9
Open

feat(cli): add browser_task tool#5
iscekic wants to merge 6 commits into
kwf-bench-basefrom
kwf/deliver-the-work-described-b-eed9

Conversation

@iscekic

@iscekic iscekic commented Aug 31, 2026

Copy link
Copy Markdown
Owner

What changed

  • The CLI exposes a browser_task tool that sends a goal to the user's browser extension and returns the result in the chat.
  • The tool returns a summary, evidence when available, a terminal status, and a task ID.
  • Calling the tool again with the task ID continues that browser conversation. It does not resend the goal or the CLI transcript.
  • The caller must name one enabled, connected browser provider. The tool never falls back to another provider.
  • A long task returns an accepted job with a task ID and a hint to check progress later. It does not hold the request open.
  • A task settles with an honest terminal status on timeout, provider loss, or disconnect.
  • A repeated submit of the same logical task reuses one invocation ID, so the server dedupes instead of starting a duplicate run.
  • The task owner comes from the authenticated connection, never from a model argument.
  • The tool fails closed until the browser_tasks.enabled setting is set, and it stays hidden when the session is not connected.

Why

The browser extension already hosts a browser agent. The CLI needs a way to delegate a goal to it and receive the result, without hosting the agent in the CLI, adding a second transport, or changing mobile. The requirements demand per-profile queueing, continuation by task ID, honest settlement, reconnect recovery with dedupe, and an owner derived from authentication.

Verification

  • Driver checks: per-slice checks passed.
  • Backend session-ingest check passed.
  • CLI test:ci failed only on files that also fail on clean main (pre-existing); advisory.
  • Extension chrome e2e passed.

Notes for the reviewer

  • The diff adds a stray test helper at packages/opencode/test/kilocode/runner-tree-71132-1788260372845.test.ts. It spawns a sleep process, writes a PID marker, and throws when KILO_TEST_RUNNER_PID_FILE is unset. Remove it before merge.

@iscekic iscekic self-assigned this Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant