Skip to content

[codex] Forward window.agent timeouts to remote dispatch#137

Open
xTRam1 wants to merge 2 commits into
mainfrom
codex/remote-dispatch-timeout-lifecycle
Open

[codex] Forward window.agent timeouts to remote dispatch#137
xTRam1 wants to merge 2 commits into
mainfrom
codex/remote-dispatch-timeout-lifecycle

Conversation

@xTRam1
Copy link
Copy Markdown
Contributor

@xTRam1 xTRam1 commented May 29, 2026

Summary

  • Forward window.agent(timeout=...) into the remote-dispatch request body for both narada and narada-pyodide.
  • Add focused tests proving the timeout is sent while parent run id behavior is preserved.

Why

Python callers were timing out locally while the backend request still had the default long expiry. That let frontend child runnables keep running after the Python parent resumed, which could make retries hit the runnable stack invariant.

How I Tested This

Focused SDK tests:

uv run --package narada --with pytest --with pytest-asyncio pytest \
  packages/narada/tests/test_window_human_interaction.py::test_dispatch_request_forwards_timeout

uv run --package narada-pyodide --with pytest --with pytest-asyncio --with pyodide-py pytest \
  packages/narada-pyodide/tests/test_cloud_browser.py::test_local_browser_window_dispatch_request_uses_latest_parent_run_ids

Lint and diff checks:

ruff check \
  packages/narada/src/narada/window.py \
  packages/narada/tests/test_window_human_interaction.py \
  packages/narada-pyodide/src/narada/window.py \
  packages/narada-pyodide/tests/test_cloud_browser.py

git diff --check

Cross-repo live harness proof:

  • The live proof exercised the same request shape through a harness-local shim because frontend currently installs published narada-pyodide==0.0.56.
  • Stack run id: timeout-lifecycle-3283-fix4-20260529
  • Artifact root: /tmp/narada-e2e-runs/20260529T214232Z-remotedispatchtimeoutlifecycle-timeout-lifecycle-3283-fix4-20260529
  • The first child request timed out with structured timeout text, the retry completed successfully, and the raw runnable stack-admission error did not appear.

Release note: after this SDK change is published, frontend should bump its configured narada-pyodide dependency so product Pyodide workflows send the timeout without the harness shim.

Codex sibling refs

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