Skip to content

Add sub-agent response text to Python traces#121

Merged
sebzhao merged 1 commit into
mainfrom
codex/python-subagent-response-text-trace
May 13, 2026
Merged

Add sub-agent response text to Python traces#121
sebzhao merged 1 commit into
mainfrom
codex/python-subagent-response-text-trace

Conversation

@xTRam1
Copy link
Copy Markdown
Contributor

@xTRam1 xTRam1 commented May 13, 2026

Summary

This updates the Python trace schema so nested Python APA traces can preserve the actual text returned by sub-agent calls, and so GUI custom-agent child traces can be parsed without losing their nested children subtree.

What changed

  • Added optional text to PythonSubAgentCallEvent in narada-core models and typed dicts.
  • Added optional children to RunCustomAgentTrace so frontend/product traces that use the GUI custom-agent shape are accepted by the SDK trace model.
  • Updated narada-pyodide tracing emission so window.agent(...) records the returned response text alongside request_id, status, and nested action trace.
  • Bumped package versions for publishing:
    • narada-core: 0.0.24
    • narada-pyodide: 0.0.53
    • narada: 0.1.53a3

Why

The local nested APA and GUI trace investigations showed two information-loss bugs:

  1. Operator/Core sub-agent calls could succeed but their final textual response was absent from the Python action trace.
  2. GUI custom-agent traces could contain nested child trace data under children, which the current SDK model did not parse.

Both made observability look incomplete even when the underlying agent call worked.

Validation

  • uv run pytest packages/narada-pyodide/tests/test_cloud_browser.py -q — 12 passed
  • uv run ruff check packages/narada-core packages/narada-pyodide packages/narada
  • python -m py_compile over changed SDK packages
  • uv build --package narada-core
  • uv build --package narada-pyodide
  • uv build --package narada
  • Live CFT proof used these local wheels in the frontend Pyodide runtime and captured persisted observability evidence for nested Python APA, GUI custom-agent, and Operator runs.

Representative artifact root:

/tmp/narada-e2e-runs/20260513T013044Z-trace-completeness-trace-complete-local-20260513t013044z

@xTRam1 xTRam1 changed the title [codex] Add sub-agent response text to Python traces Add sub-agent response text to Python traces May 13, 2026
@xTRam1 xTRam1 marked this pull request as ready for review May 13, 2026 02:33
@sebzhao sebzhao merged commit 9151788 into main May 13, 2026
5 checks passed
@sebzhao sebzhao deleted the codex/python-subagent-response-text-trace branch May 13, 2026 18:03
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