Skip to content

Prefer in-app diagnostics over lengthy manual browser-console inspection #440

Description

@williamthorsen

Problem

During interactive bug-hunt sessions, agents routinely ask the developer to open a browser console, reproduce a flow, copy-paste the console output, and repeat — sometimes across multiple windows, extension-reload cycles, and navigation sequences. For any repro that is more than a few minutes end-to-end, this collaboration pattern is expensive and error-prone:

  • Every repro attempt requires the developer to execute a precise sequence of manual steps in the correct order. A missed step or out-of-order action invalidates the output and restarts the loop.
  • Console output has to be manually selected, copied, and pasted — with a high risk of truncation, timestamp misalignment, or missing tabs.
  • Each iteration fans out into a multi-turn conversation where the agent interprets partial evidence, proposes the next experiment, and waits for the developer to execute it.

Concrete example: ticket #344 in afg-devtools required several repro cycles involving Chrome extension reload, DevTools open/close, multi-tab navigation, bfcache-restore via Back/Forward, and service-worker console capture. The single-ticket cost exceeded USD 800 before the bfcache follow-up bug was even isolated — substantially because every iteration of the diagnostic loop was a manual dance across browser windows.

Proposed solution

Add guidance to the collaboration skill that when manual diagnostic inspection would take more than a few minutes, or requires a repeatable sequence, the agent should proactively propose building the diagnostic affordance into the app under test rather than asking the developer to capture output by hand.

Concretely, the agent should suggest (and, if appropriate, implement):

  • A bounded ring-buffer log kept in the app (e.g., chrome.storage.session for a Chrome extension, an in-memory buffer for a Node service) that mirrors whatever the developer would otherwise be copying from a console.
  • A trivial affordance to dump that log — a download button, a Copy log action, a file written on shutdown, an endpoint that returns the JSONL dump. The cheapest form that gets the data into the conversation in one step.
  • Optional developer-controlled markers (Mark start of step 3) to make logs easier to correlate with the repro script.

The target interaction model: the agent writes a repro script, the developer runs it once, the developer uploads a single log file. No console copy-paste round-trips.

Threshold heuristic

Rough decision rule: if the repro requires >N manual actions, or >M minutes of developer attention per iteration, prefer building in-app diagnostics first. Exact values of N and M can be calibrated once this lands; N >= 3 and M >= 2 feel about right from the #344 experience.

Where this goes

This rule belongs in the collaboration skill, under a new section (suggested: ## Diagnostics for long repros). It sits alongside the existing principles about pausing for user input, but applies specifically when the agent is about to commit the developer to a manual observation loop.

Metadata

Metadata

Labels

featureAdded or improved external functionalityscope:agents

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions