stagehand-python@4.2.0a0.dev1574: Harden Codex CUA facade isolation, evidence, and tool logging ( 2907)
Stagehand release 4.2.0a0.dev1574 hardens the Codex Computer Use Agent (CUA) facade by introducing isolated HOME/CODEX HOME profiles, opt-in JSONL tool logging, and tool-call ID-keyed evidence matching.
Why this signal matters
This pre-release ports focused hardening for the Codex and Stagehand facade without replacing the shared consolidation runtime. Key updates include: - Opt-in JSONL tool logging: Captures request/session IDs, arguments, timing, errors, and bounded result previews to file or stderr while avoiding MCP stdout and redacting known credentials. - Failure artifacts: Optionally saves bounded SDK diagnostic artifacts without masking original SDK errors. - Profile isolation: Shares HOME and CODEX HOME creation across SDK examples and evaluations via @browserbasehq/stagehand-integrations-codex-sdk , copying only file-based auth.json while excluding operator plugins, config, and thread context. - Evidence matching: Probes match evidence directly by tool-call ID to prevent screenshot shifting caused by missing final captures or unrelated calls. - Bug fixes: Escapes Unicode line separators in text tool results (resolving Hostelworld stream parsing failures) and aborts on unexpected MCP servers (operational detection, not a sandbox). - Preserved boundaries: Retains terminal session-loss semantics and shared facade API; does not claim benchmark score improvements.
Actionable summary
Stagehand Python release 4.2.0a0.dev1574 introduces opt-in JSONL facade tool logging (redacting credentials, omitting images, avoiding MCP stdout), binds screenshot evidence to tool-call IDs to prevent screenshot drift, isolates HOME/CODEX HOME profiles across SDK examples and evals, and escapes Unicode line separators in text tool results.
- Agent usefulness
- 77/100
- Confidence
- 96%
- Canonical data
- JSON + Markdown
What builders should check
- Opt-in to JSONL facade tool logging and configure diagnostic directories ( STAGEHAND CODEX DIAGNOSTICS DIR or EVAL CODEX DIAGNOSTICS DIR ) if detailed telemetry is required.
- Verify that credentials rely on file-based auth.json rather than keychain-only authentication, as only file-based auth is copied into isolated profiles.
- Review exported JSONL logs and diagnostic artifacts before sharing externally, as they may contain sensitive model or page content despite best-effort redaction.