Skip to content

Preserve LightSwarm runtime context#80

Merged
wxai-space merged 1 commit into
wanxingai:mainfrom
helloJamest:codex/lightswarm-runtime-context
Jul 17, 2026
Merged

Preserve LightSwarm runtime context#80
wxai-space merged 1 commit into
wanxingai:mainfrom
helloJamest:codex/lightswarm-runtime-context

Conversation

@helloJamest

Copy link
Copy Markdown
Contributor

Summary

Closes #79.

This PR preserves LightAgent runtime context across LightSwarm entry runs and delegated handoffs.

Changes:

  • allow LightSwarm.run(..., **run_kwargs) to forward supported LightAgent.run() options;
  • pass runtime context such as user_id, metadata, trace, result_format, max_retry, and max_tool_iterations to delegated target agents;
  • keep existing handoff trace hierarchy via parent_trace_id and run_group_id;
  • add regression tests for the entry-agent path and the delegated handoff path.

This does not automatically merge delegated traces into the source agent trace. It only preserves the existing explicit context and trace hierarchy knobs across the LightSwarm path.

Tests

python -m pytest

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.

Preserve runtime context across LightSwarm handoffs

2 participants