Skip to content

Add Browserbase account sessions and social comment docs#2

Merged
albertcyhe merged 1 commit into
mainfrom
codex/browserbase-social-comments-docs
May 20, 2026
Merged

Add Browserbase account sessions and social comment docs#2
albertcyhe merged 1 commit into
mainfrom
codex/browserbase-social-comments-docs

Conversation

@albertcyhe
Copy link
Copy Markdown
Owner

Summary

  • add first-class Browserbase account/context/session/proxy management
  • support Browserbase account sessions in adapter execution and JSONL pooled runs
  • attach browser-level CDP endpoints before page commands so Browserbase connectUrl works
  • document Browserbase workflows and social comment support across major platforms
  • update .gitignore for local env and Browserbase-sensitive artifacts

Validation

  • npm run build-manifest
  • npm run typecheck
  • npm test
  • npm run docs:build

@albertcyhe albertcyhe merged commit f584ace into main May 20, 2026
@albertcyhe albertcyhe deleted the codex/browserbase-social-comments-docs branch May 20, 2026 14:48
Copy link
Copy Markdown

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

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: c0748f8477

ℹ️ 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 src/browserbase/pool.ts
Comment on lines +48 to +50
await this.waitForCapacity(request.accountName);
this.activeAccounts.add(request.accountName);
this.activeSessions += 1;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Reserve pool capacity atomically in acquire

acquire waits for capacity and only then marks the account/session as active, but that reservation happens after an await. With parallel workers, two acquires can both pass waitForCapacity before either increments activeSessions/activeAccounts, so both create sessions and exceed maxSessions (and per-account exclusivity). This can cause quota spikes and breaks the pool’s core concurrency guarantee.

Useful? React with 👍 / 👎.

Comment thread src/commands/run.ts
Comment on lines +189 to +193
await pool.release(lease.value, { status: 'success' });
emitRunEvent({ type: 'succeeded', jobId: job.id, accountName, durationMs: Date.now() - started, result });
} catch (error) {
failures += 1;
await pool.release(lease.value, { status: 'failed', errorMessage: getErrorMessage(error) });
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Treat Browserbase release errors as job failures

pool.release returns a Result, but this path ignores ok/error and always emits a terminal event as if cleanup succeeded. If Browserbase rejects release (API error, quota, stale session), the run still reports success/failure for the job without surfacing the leaked session, which can leave keepalive sessions orphaned and make the summary inaccurate.

Useful? React with 👍 / 👎.

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