Skip to content

feat(conversation): stream the model's reasoning onto live replies - #705

Closed
Nash0x7E2 wants to merge 1 commit into
nash/conversation-artifactsfrom
nash/conversation-live-reasoning
Closed

Nash0x7E2 wants to merge 1 commit into
nash/conversation-artifactsfrom
nash/conversation-live-reasoning

Conversation

@Nash0x7E2

Copy link
Copy Markdown
Member

Why

Athena web shows a "Thinking…" disclosure on a reply while it is being written. It reads a top-level reasoning string off the Chat message, which only arrives on ephemeral message.updated updates; it keeps what it saw in memory and forgets it on reload. The stale Athena runtime branch (2d40a966) wrote that field. #699 ported that commit's tool steps but not the reasoning. On accelerate the LLM router already streams reasoning as llm.ReasoningTextDelta (OpenAI reasoning deltas, reasoning_content from OpenAI-compatible providers such as DeepSeek), but the agent dropped it.

Reasoning can name tools and internal details, so it is opt-in: an agent config has a new show_reasoning boolean, off by default, and every existing config starts off.

Changes

  • The agent reports thinking on a written reply as agent.ReasoningDelta. A voice never gets it.
  • A persistent conversation whose config has show_reasoning on keeps the last 4000 bytes of the current reply's thinking and adds them as reasoning to the ephemeral update it already sends on its live tick. Reasoning never goes into the outbox, the local ledger or the settled message, and it resets when the next command starts.
  • show_reasoning is added to AgentConfig, AgentConfigRequest and AgentConfigPatch, with migration 20261001130000, a regenerated spec, the Go client and JS types, and a note in the sdk skill for the other SDKs.

🤖 Generated with Claude Code

A reasoning model's thinking (OpenAI reasoning deltas, reasoning_content
from OpenAI-compatible providers such as DeepSeek) already reached the
agent as llm.ReasoningTextDelta and stopped there.

A written reply now reports it as an agent.ReasoningDelta, and a
persistent conversation carries it to watchers as a top-level
"reasoning" string on the reply's ephemeral Chat updates, keeping only
its last 4000 bytes and riding the existing live-update tick. It never
reaches the outbox, the local ledger or the settled message, and it is
reset when the next command begins.

Thinking can name tools and internal details, so it is shown only for
an agent config with the new show_reasoning turned on. It is off by
default, including for every existing config.
@Nash0x7E2
Nash0x7E2 force-pushed the nash/conversation-artifacts branch from 2f6806f to bfd4bce Compare October 1, 2026 17:54
@Nash0x7E2
Nash0x7E2 force-pushed the nash/conversation-live-reasoning branch from 70a73b6 to dbe68ff Compare October 1, 2026 17:55
@Nash0x7E2

Copy link
Copy Markdown
Member Author

Superseded by the port of #683 and #704 (Athena's newer ai_* attachment and reasoning-window contract), stacked on #700.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant