You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Python observe() without an instruction sends null and fails worker validation #3368
await stagehand.observe() (no instruction) is a supported API. Python sends "instruction": null. The worker schema accepts an omitted string, not null.
Instruction is omitted on the wire (same as TypeScript). Default observe runs.
Actual
Live Browserbase session on https://example.com/: failed in ~1.6s with
Invalid input: expected string, received null
path: ["params", "instruction"]
Notes
Python always constructs StagehandObserveParams(..., instruction=instruction), so default None is serialized. TypeScript only spreads instruction when it is defined.
Possible direction: omit the field when the caller did not pass an instruction.
I can reproduce this on main (1e50db6): Stagehand.observe() in packages/sdk-python always builds StagehandObserveParams(..., instruction=instruction), so None goes out as null. Working on a fix that omits the field when no instruction is passed, with a test on the serialized request.
Activity
rome-xi commentedon Nov 4, 2026
I can reproduce this on main (1e50db6):
Stagehand.observe()inpackages/sdk-pythonalways buildsStagehandObserveParams(..., instruction=instruction), soNonegoes out asnull. Working on a fix that omits the field when no instruction is passed, with a test on the serialized request.