Skip to content

Allow action recordings in domain-restricted sessions - #8

Open
tanvesh01 wants to merge 2 commits into
ampcode:mainfrom
tanvesh01:fix-contained-browser-recording
Open

tanvesh01 wants to merge 2 commits into
ampcode:mainfrom
tanvesh01:fix-contained-browser-recording

Conversation

@tanvesh01

@tanvesh01 tanvesh01 commented Oct 27, 2026 •

Copy link
Copy Markdown

The recorder always passes --restore. agent-browser rejects that flag for sessions opened with --allowed-domains, and the failed command can leave the session unable to run ordinary commands.

What changes

  • start accepts the session's --allowed-domains list, or reads AGENT_BROWSER_ALLOWED_DOMAINS. It saves the list for the recording and passes it to every browser command instead of --restore.
  • Recordings without an allowlist continue to use --restore. For contained recordings, the recorder rejects conflicting restore environment variables before starting agent-browser.
  • The skill documents how to record with an allowlist and that contained sessions cannot restore login state or an interrupted recording.

The list must be passed to start when it was specified only on the browser's initial command; session info does not expose it to the recorder.

Checked

  • Reproduced the error with the original recorder and agent-browser 0.38.1; the next ordinary command also failed.
  • Recorded a button click in a live allowlisted Chromium session, stopped and probed the MP4, and verified that the session remained usable and blocked navigation to a domain outside the list.
  • After closing a contained browser during recording, a recorder command still rejected a non-allowlisted domain when the browser restarted.
  • Recorded a click without an allowlist and verified localStorage was restored after closing and reopening the session.
  • Format and git diff --check pass.

Not checked

  • An allowlist supplied only through agent-browser's config file; pass the list to start in that case.
  • Browsers other than the orb's Chromium and agent-browser 0.38.1.

ampagent and others added 2 commits October 27, 2026 10:13
Amp-Thread-ID: https://ampcode.com/threads/T-01a17cbe-3194-727f-96ca-257cd19df3c7
Co-authored-by: Tanvesh sarve <sarvetanvesh01@gmail.com>
Amp-Thread-ID: https://ampcode.com/threads/T-01a17cbe-3194-727f-96ca-257cd19df3c7
Co-authored-by: Tanvesh sarve <sarvetanvesh01@gmail.com>
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.

2 participants