docs: consolidate session work-unit vocabulary (#35218)

This commit is contained in:
Kit Langton 2026-07-03 14:49:05 -04:00 committed by GitHub
commit ca861fdf43
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 79 additions and 59 deletions

View file

@ -166,7 +166,7 @@ const layer = Layer.effect(
{ concurrency: "unbounded" },
).pipe(Effect.map(SystemContext.combine))
const runTurnAttempt = Effect.fn("SessionRunner.runTurn")(function* (
const runTurnAttempt = Effect.fn("SessionRunner.runTurnAttempt")(function* (
sessionID: SessionSchema.ID,
promotion: SessionInput.Delivery | undefined,
step: number,
@ -423,6 +423,10 @@ const layer = Layer.effect(
while (shouldRun) {
let needsContinuation = true
let step = 1
// Repeat steps while continuation is needed. A step needs continuation only
// when it recorded local tool calls whose results the model has not yet seen;
// a provider error suppresses it. Pending steers also continue the loop so
// interjections are answered before the session goes idle.
while (needsContinuation) {
const result = yield* runTurn(input.sessionID, promotion, step)
// Steer/queue promotion inside runTurn has already made the pending input a visible