Replies: 1 comment
|
A concrete data point from the Pi-plugin route may be useful for the additive design proposed here. In pi2dsh, a Pi extension calling The persistent-session half has been exercised across two separate OS processes: process 1 records the child's archive identity; process 2 reopens that exact DSH session through This does not solve the optional event/session contract for out-of-process Codex/ACP providers, but it is evidence that the proposed rich lifecycle can coexist with DSH's mandatory one-shot minimum when the provider can materialize a native child session. The descriptor + lineage + persisted-resume shape may be useful as the normalization target. Implementation and falsifiable acceptance: |
Uh oh!
There was an error while loading. Please reload this page.
Hi! I have spent some time reading the Subagent implementation, especially the Codex provider, and wanted to share where I landed.
My first reaction was that
CodexProviderlooked almost too thin. After following the call chain, I changed my mind: most of that simplicity is earned by the Subagent layer. The framework owns provider registration, capability checks, descriptors, parent/child identity, cancellation, result settlement, lifecycle events, and disposal; the provider only owns the backend-specific mechanism.That is a clean design for one-shot delegation.
This exploration started from a few practical questions:
Following those questions through the code made one tradeoff stand out:
The current public handle is essentially:
Source: SubagentRun
That is a very good minimum. I wonder whether it could remain the minimum while gaining a few optional layers for richer providers.
1. An observation stream separate from model context
Codex App Server can emit agent-message deltas, reasoning summaries, command output, file changes, tool progress, and usage updates. The current Codex adapter deliberately keeps only the completed final answer, which fits the existing
SubagentRunresult contract.The limitation is that there is no standard place to expose those events even to UI, tracing, or diagnostics.
A possible incremental extension:
The important part would be semantic, not just syntactic:
Intermediate events should not automatically enter the parent model context. That keeps context and prompt caching stable while still allowing users to see what the child is doing.
2. An optional external-session capability
The one-shot path creates a fresh Codex process, ephemeral thread, and single turn. Meanwhile, Codex App Server itself supports thread resume/fork and turn steer/interrupt.
DSH's continuation manager is strong for DSH-owned children, but the current Provider contract does not give an external provider ownership of a persistent remote session.
Rather than stretching
SubagentRun, perhaps this deserves a separate optional capability, something along the lines of:Providers that only support one-shot work would stay exactly as they are. Codex, ACP, or future remote agents could opt into the richer lifecycle.
3. Structured effects and diagnostics
A child can modify the shared workspace and then finish with
stopReason: "error". The parent learns that the run failed, but the generic result does not describe:It might be useful for
SubagentResultto optionally carry provider-neutral metadata such as changes, artifacts, usage, structured diagnostics, and provider correlation IDs. This would make failures and side effects easier to inspect without forcing backend-specific details into the final assistant text.Why I think this can be incremental
I would not replace the current one-shot seam. Its small surface is a feature:
The possible direction is additive:
This would preserve the good part of the current design while avoiding a lowest-common-denominator ceiling for richer Agent backends.
I realize some of these choices may be intentionally deferred while DSH is still pre-release, and I may be missing constraints that are obvious to the maintainers. I would be very interested in the team's view on where the Subagent seam is meant to stop.
Also, I noticed the repository currently does not accept external pull requests. If the team would like community help on a small, well-scoped part of this area, I would genuinely enjoy contributing code, tests, and documentation. Feel free to invite or point me (
@Risu12138) at a concrete slice — I promise to start smaller than this discussion. 🙂All reactions