Skip to content

feat(browser): let agents choose profiles and preserve Fill - #315

Merged
lastobelus merged 5 commits into
lastcode/mainfrom
lastcode/agent-browser-profiles
Oct 7, 2026
Merged

lastobelus merged 5 commits into
lastcode/mainfrom
lastcode/agent-browser-profiles

Conversation

@lastobelus

@lastobelus lastobelus commented Oct 7, 2026 •

Copy link
Copy Markdown
Owner

Agents currently have to use the default browser profile for signed-in tasks, and opening a tab overrides Fill with a fixed 1280×800 viewport.

Add preview_profiles and explicit profileName/profileId selection to preview_open, with returned profile identity and helpful errors for missing, ambiguous, or mismatched profiles. Tabs retain their cookie jars, ordinary tabs keep the configured default, and new tabs preserve the configured viewport. Older assigned desktops fail explicit selection instead of ignoring it. Profile support is advertised separately so updated desktops retain ordinary browser automation with older servers. Also allow the existing LastCode desktop renderer schemes to negotiate development API requests.

Validation:

  • 211 focused tests passed across eleven files, including tool-catalog registration, older-server registration compatibility, and profile-capability routing.
  • Scoped web/server typechecks, targeted lint, and the contracts unused-export check passed; full diff source review is clean.
  • Isolated native desktop automation verified profile discovery/selection, separate Default cookies, persistent sessions across two projects, rejection of tab/profile mismatches, and preservation of Fill/custom sizes before rebase. Final visual screenshot verification was stopped because OS authentication prompts made foreground QA disruptive.

Implemented and reviewed with GPT-6.1-Sol through the Codex harness.

@lastobelus

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-07T03:57:05.896336Z 0cd31c2 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: 44a3435624

ℹ️ 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".

@lastobelus

Copy link
Copy Markdown
Owner Author

@codex review

@lastobelus
lastobelus force-pushed the lastcode/agent-browser-profiles branch from c83ea9f to aa05431 Compare October 7, 2026 03:25
@lastobelus

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: aa054310e0

ℹ️ 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".

Comment thread packages/contracts/src/previewAutomation.ts
@lastobelus

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: 98e522533d

ℹ️ 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".

@lastobelus

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: bc934c4a3f

ℹ️ 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".

lastobelus and others added 5 commits October 6, 2026 20:53
Add profile discovery and explicit profile selection without changing the default or an existing tab's cookie jar. Keep the configured viewport on agent-created tabs, including Fill.

Carry-Group: incubator

Carry-Observation: Profile selection and viewport preservation share the desktop automation open path and ship together as one browser workflow feature.

Co-Authored-By: Code <code@openai.com>
Allow the LastCode desktop schemes to negotiate browser API requests alongside the existing T3 Code schemes. Cover development-mode preflight and GET requests, including rejection of unrelated origins.

Carry-Group: incubator

Carry-Observation: Isolated desktop verification of agent browser profiles exposed the missing LastCode renderer origins.

Co-Authored-By: Code <code@openai.com>
Give preview_profiles the browser lifecycle labels and summary used by the shared tool catalog.

Carry-Group: incubator

Carry-Observation: Profile discovery is part of the agent browser profile feature and must be recognized by the shared tool presentation catalog.

Co-Authored-By: Code <code@openai.com>
Advertise profile selection through an optional host flag while keeping the protocol-2 operation list stable. Cover older-server registration decoding and profile-capability routing.

Carry-Group: incubator

Carry-Observation: Profile selection changes the desktop automation registration shared by existing browser operations, so its capability must preserve older server registration.

Co-Authored-By: Code <code@openai.com>
The renderer uses the stable protocol-2 advertisement, so the full request operation list is only used inside its contract module.

Carry-Group: incubator

Carry-Observation: Profile capability negotiation separates the stable advertisement from the internal request operation list.

Co-Authored-By: Code <code@openai.com>
@lastobelus
lastobelus force-pushed the lastcode/agent-browser-profiles branch from bc934c4 to 0cd31c2 Compare October 7, 2026 03:54
@lastobelus

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: 0cd31c2696

ℹ️ 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".

@lastobelus
lastobelus merged commit 04fc251 into lastcode/main Oct 7, 2026
17 checks passed
@lastobelus
lastobelus deleted the lastcode/agent-browser-profiles branch October 7, 2026 04:01
lastobelus added a commit that referenced this pull request Oct 7, 2026
)

Background browser QA could stall on a hidden-tab capture, disconnect unrelated automation, or require opening the owning thread before its tab existed. Saved QA handoffs also stopped being recoverable after their 24-hour process lease and could lose browser authentication before a person returned.

This keeps browser hosting subscribed outside chat views, acquires bounded native rendering surfaces, measures the applied viewport, and cancels expired work without replaying mutations or evicting unrelated hosts. Retained handoffs now outlive their processes: opening the saved link or panel restores the process and renews opted-in T3 development browser access. Healthy open forms are preserved. QA guidance selects ordinary and authenticated profiles explicitly and prepares manual QA without requesting a review window.

Fixes #287. Named profile selection itself was delivered in #315; this completes its background reliability and evidence-upload workflow.

Validation:
- Hidden ordinary Electron window: real screenshots at 390×844 CSS pixels, native screencast frame/ACK/stop, file input and file chooser upload, isolated profile cookies, and recovery after an injected capture stall.
- Integrated web client: live streamed page and reopening an existing handoff without a duplicate tab or reload.
- Focused server, native, hosting, client, and instruction tests; server/contracts/desktop/web/mobile typechecks; independent implementation review and recheck.
- Before: a screenshot timeout stranded subsequent evaluation; resize reported 1280×800 when page metrics were 390×844. After: native metrics and pixels agree and the same/other tab remain usable after cancellation. OS-minimized behavior is not claimed by the hidden-window fixture.

Native hidden-window capture (390×844 CSS pixels at 2× device scale):

<img width="390" alt="Native browser fixture with verified mobile viewport" src="https://github.com/user-attachments/assets/259f4c79-8a69-495f-8d69-348d42838cdb" />

Upstream provenance (adapted, with additional native rendering, cancellation, and epoch fencing fixes):
- https://redirect.github.com/pingdotgg/t3code/pull/16941 — pinned head `f88dc5fb4c6b91bd5715d3aacf5f931bb1fba6b9`.
- https://redirect.github.com/pingdotgg/t3code/pull/16620 — pinned head `1722a7ae9060883d71d3ba06872c54076dec6bf1`.

The guarded merge command also accepts `--skip-checkpoint` so an explicitly deferred checkpoint is not requested after merging; CI, review, and merge guards remain intact. No package build, installation, or restart is part of this delivery.

Implemented with GPT-6-Astra and GPT-6.1-Sol through the Codex harness; Luna agents audited code/history/guidance, and Astra independently reviewed the implementation.

Carry-Source-Ref: refs/lastcode/carry-sources/pr-325/1aecc826d8637166ed879ebeac1eccca786a47ff
Carry-Source-Base: 804ff49
Carry-Source-Head: 1aecc82
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant