docs: name the public agent injection seam

This commit is contained in:
Tianyi Cui
2026-07-14 09:29:02 +08:00
parent 25850458ac
commit ba8a5c89ed

View File

@@ -457,7 +457,7 @@ export function apply(ctx: Context): void {
)
} catch (error: unknown) {
// The ONE expected failure: the agent was disposed between task
// completion and this injection (ReactLoopAgent.inject throws
// completion and this injection (Agent.inject throws
// `agent "<id>" is disposed`). That race is benign — drop the notice.
// Anything else is a real bug and must surface, not be swallowed.
if (error instanceof Error && error.message.includes('is disposed')) return