4 Commits

Author SHA1 Message Date
zszz3
2026ee4f18 fix: keep per-session data out of capability system blocks 2026-11-29 16:32:47 +08:00
Bingxi Zhao (Frank)
02ba56793e chore: checkpoint backend stabilization workspace 2026-09-01 21:28:15 +08:00
Bingxi Zhao (Frank)
8070773747 fix(course): the recommendation is the answer, not a tool preamble
Course Study turns were ending on "I could not produce a useful response
from the model output", with the real recommendation sitting collapsed in
the trace above it — and, in one observed turn, written out three times.

The loop treats prose emitted alongside a tool call as a preamble: it is
streamed into the trace, and the answer is whatever a later tool-less
round says. That is right for tools that fetch something. It is wrong for
this playbook, which asks for the opposite shape — recommend the next
action, say why it is timely, then call `course_handoff`. The
recommendation and the call are one thought, and models write them in one
round. Dropped from the answer, the model had nothing new to add on the
next round, so it called `course_handoff` again until the budget ran out
and the turn finished empty.

The partner-group capability documents the same failure for
`invoke_other` and already carries the remedy: classify the tool round's
prose, then end the turn on it. Course Study now implements both hooks.

Two details worth keeping:

`_capability_answer_published` is deliberately not set. It means "the
learner has already seen this text, do not emit it again", which holds
for capabilities that buffer output behind a protocol. This mode buffers
nothing, so claiming it left the message body empty with the whole
recommendation hidden a click away — the original symptom, differently
caused.

A bare `course_handoff` with nothing said is left alone rather than
ending the turn: there is no answer to rescue, and the model still gets
its ordinary finish round to write one.

The flag was named `_partner_group_formal_answer_published` while living
in the generic loop, which now has a second caller; renamed to match what
it is.
2026-08-30 00:45:10 +08:00
Bingxi Zhao (Frank)
fc0be68d6f wip: course / partner groups in progress 2026-08-29 22:29:53 +08:00