Skip to content

The Chat window never shows a Harness's thinking, and nothing decided that it should not #483

Closed

Description

@omesser

Related: #144 (richer AI interactions, item 5 is the streaming half of this), #16 (Action Log, closed), #17 (Chat surface), ADR-0010, ADR-0017.

Why

Every TUI harness people come from — Claude Code, hermes, opencode — streams its thinking while it works. The ai-buddy Chat window never shows any. This is an investigation writing down where it goes, because nothing in the repo says it was decided; it was never wired.

Verified on 334008cb.

Where it is lost

Harness path — src-tauri/src/acp_wire.rs:584 fn note_update. The match names AgentMessageChunk, ToolCall, ToolCallUpdate, Plan, UsageUpdate, and ends _ => {} at acp_wire.rs:609. The schema crate has the variant we are not naming — agent-client-protocol-schema-1.7.0/src/v1/client.rs:105:

/// A chunk of the agent's internal reasoning being streamed.
AgentThoughtChunk(ContentChunk),

Nothing downstream can see a thought, because nothing upstream of that arm keeps one. The Event enum it feeds (acp_wire.rs:74) has no thought variant either, so neither note_event (src-tauri/src/harness.rs:722, the Action Log writer) nor the Chat surface is ever offered one. There is no comment on the catch-all — it is an unwired case, not a refusal.

HTTP path — src-tauri/src/model.rs:1338 and model.rs:1355. read_event reads choices[0].delta.content and the Responses response.output_text.delta. Anything else returns Event { delta: None, .. }, which the doc comment at model.rs:1338 states outright: "Events that carry none — a role announcement, usage, a reasoning trace — are not errors." So reasoning_content on chat-completions and response.reasoning_summary_text.delta on Responses are read, matched by nothing, and dropped. The existing test at model.rs:2170 streams reasoning_content and asserts the turn yields Complete(String::new()) — thinking arriving and producing no text is currently the specified behavior.

Upstream of that, model.rs:1179 sends "reasoning": { "effort": "low" } on Responses to keep grok-4.6 from spending 16s on a two-line pick, and model.rs:73 raises the local cap to 512 tokens because Qwen3/gpt-oss think their whole budget away. Both suppress rather than surface. Nothing strips a <think> block, so a local model that emits one inline sends it straight into as_speech and out of the buddy's mouth — untested, but there is no code that would prevent it.

Does it arrive?

Measured, not assumed. scripts/probe-harness.sh only prints what the repo already parses, so I drove the same agents by hand over raw JSON-RPC (a scratchpad client, no repo change).

  • npx -y @agentclientprotocol/claude-agent-acp 0.49.0, a prompt with ultrathink in it: updates were available_commands_update, usage_update x4, agent_message_chunk x2. Zero agent_thought_chunk.
  • hermes acp on a local gemma: same, zero.

The adapter does implement it — @agentclientprotocol/claude-agent-acp/dist/acp-agent.js:3242:

case "thinking":
case "thinking_delta":
    // Recent models default `thinking.display` to "omitted", which streams
    // signature-only thinking blocks whose text is empty.
    if (chunk.thinking.length > 0) { update = { sessionUpdate: "agent_thought_chunk", ...

So on today's default settings there is nothing to display even if we kept it. agent_thought_chunk becomes real when a Harness is configured for visible thinking. Not verified: opencode (not installed here), and any harness with thinking display turned on.

Could the window show it?

Not today, and not for thoughts alone. Link::prompt (acp_wire.rs:231) is documented as "the concatenated agent_message_chunks once the turn ends in end_turn" — the Shell hands the Chat surface one finished string on the chat event (src-tauri/src/main.rs:113), and src/chat.js:296 appends it in one call. opening_answer at chat.js:102 already anticipates the other case in its own comment — "The Shell hands over a finished Wake today, so it arrives in one piece and the append runs once; when the session grows chunks (the Harness client), each lands here" — but no chunk event exists. There is no streaming into that window at all. Thinking cannot stream in ahead of an answer that does not stream.

What it collides with

  • The Director's reply contract. A reply is a Behavior name on the first line, optionally with a spoken line (crates/core/src/director.rs:301, as_speech at :309). Thinking is neither, and as_speech takes the whole trimmed reply as dialogue. Appending thoughts into said would make the buddy say its reasoning out loud, or make the first line of a thought parse as a Behavior name. Thoughts must be a separate channel, never part of said.
  • ADR-0010. "A log-style chat: the user's turns, the agent's text as it streams, tool calls as one-liners, and the forwarded session/request_permission prompt. Not a workbench." The design mock says it as a closed set — "four kinds of line and no fifth" (docs/design/chat.html:273). A thoughts pane is a fifth kind, and ADR-0010's gate clause reads against it: "anything the Harness reported rather than the Engine played, is the workbench arriving by another door."
  • The Action Log is where a durable record belongs, and it explicitly does not want this shape: CONTEXT.md:196 defines it as pointing "at the Harness's own session dump rather than copying it", with "Avoid: transcript". Streaming thought text into JSONL is exactly the copy that definition refuses.

Is it decided anywhere?

No. Grepping docs/adr/, docs/research/, CONTEXT.md, docs/SPEC.md and the design mocks for AgentThoughtChunk / agent_thought returns nothing outside the vendored SDK. Every "thinking" hit in the repo is the Thinking ellipsis (CONTEXT.md:268) — three dots over the sprite while a reactive turn is in flight, latency masking, not model output. ADR-0017 names the two callbacks the client registers and never enumerates SessionUpdate variants; the only variant list in the docs is docs/research/buddy-harness-two-way.md:477, which recommends tool_call, tool_call_update, plan, usage_update, stopReason — exactly what note_update implements. Thoughts are absent from it.

So: nobody excluded thinking. It was never wired, and ADR-0010 would have to be argued with before it is.

What this issue is asking for

A decision, not a patch. Either ADR-0010 widens to admit a fifth kind of line and the plumbing follows (a thought arm in note_update, a thought variant on Event, a chunk event to the Chat surface, and the streaming path #144 item 5 wants anyway), or the _ => {} at acp_wire.rs:609 gets a comment saying thoughts are dropped on purpose and why. Right now a reader of that line cannot tell which.

— Claude agent, on @omesser's behalf.

Activity

  1. added this to the V1 milestone on Sep 7, 2026
  2. moved this from Todo to In Progress in Fidgeton Sep 8, 2026
  3. moved this from In Progress to Done in Fidgeton Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestneeds-triageMaintainer needs to evaluate this issue

    Projects

    • Status
      Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions