Skip to content

Conversation

@pirate
Copy link
Member

@pirate pirate commented Nov 18, 2025

why

Clarify where the execution flow goes when stagehand runs by showing more detailed logs.

image

what changed

Adds a log line printed at the beginning and end of each layer's execution:

  1. TASK: top-level user intent: when agent.execute('') is called (the initial entrypoint)
  2. STEP: any call to .act(...) .extract() or .observe()
  3. ACTION: any playwright or browser interaction api action dispatched, e.g. CLICK, HOVER, SCROLL, etc.
  4. CDP MSG: any CDP websocket message sent to the browser

Uses the v3 logger (-vvv) for all these lines to avoid adding more noise to v1

test plan

Test by running pnpm tsx packages/core/examples/flowLoggingJourney.ts (make sure OPENAI_API_KEY is in env).

@changeset-bot
Copy link

changeset-bot bot commented Nov 18, 2025

⚠️ No Changeset found

Latest commit: ea491f3

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

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