Skip to content

fix(showcase/langgraph-python): force reasoning emission in reasoning-chain agent - #4747

Merged
tylerslaton merged 1 commit into
mainfrom
tyler/reasoning-chain-summary-detailed
May 9, 2026
Merged

tylerslaton merged 1 commit into
mainfrom
tyler/reasoning-chain-summary-detailed

Conversation

@tylerslaton

Copy link
Copy Markdown
Contributor

Summary

tool-rendering-reasoning-chain D5 probe has been sustained red since it was added (PR #4743) — every tick fails with expected [data-testid="reasoning-block"] to mount within 30000ms.

Diagnostic dumps from prod confirmed the failure mode:

  • ✅ WeatherCard mounted (toolCalls fire correctly)
  • ✅ Assistant text "Tokyo is 22°C and partly cloudy" landed
  • ❌ Zero reasoning text — the reasoningMessage slot never received an event

Root cause

Comparing to the working reasoning_agent.py (which backs reasoning-default + reasoning-custom, both D5 green):

reasoning_agent.py (works) tool_rendering_reasoning_chain_agent.py (was broken)
effort "medium" "low"
summary "detailed" "auto"
tools [] [get_weather, search_flights, get_stock_price, roll_dice]

summary: "auto" lets the model decide whether to emit a reasoning summary. With tools present, the model frequently skips emission entirely — the chain-of-thought goes straight to the tool call without a summary step. That leaves role: "reasoning" messages off the wire, so the v2 <ReasoningBlock> slot never mounts.

summary: "detailed" forces emission on every response. Bumping effort to "medium" to match the working agent.

Test plan

Known follow-up (NOT in this PR)

gen-ui-agent (Agent State) is intermittently flapping (~22% failure rate over recent ticks), with two distinct error modes ("no assistant response" and "agent-state-card never mounts"). Need to dig deeper to determine root cause — separate investigation.

🤖 Generated with Claude Code

…-chain agent

The tool-rendering-reasoning-chain D5 probe has been red since the
probe was added (PR #4743) — the reasoningMessage slot's
<ReasoningBlock> never mounts because the agent doesn't emit
reasoning summaries.

Compared to the working reasoning_agent.py (which powers
reasoning-default + reasoning-custom and is green), the only
meaningful difference was the reasoning config:

  reasoning_agent.py (works):
    reasoning={"effort": "medium", "summary": "detailed"}
    tools=[]

  tool_rendering_reasoning_chain_agent.py (was broken):
    reasoning={"effort": "low", "summary": "auto"}
    tools=[get_weather, search_flights, ...]

`summary: "auto"` lets the model decide whether to emit a reasoning
summary. With tools present the model often skips it (chain-of-thought
goes straight into the tool call without a summary). `summary:
"detailed"` forces emission on every response, which lights up the
ReasoningBlock slot. Bumping effort medium so the surface visible to
the user reads as a real chain-of-thought, matching reasoning-display.

Probe diagnostics from prod confirmed the toolCalls were firing fine
(WeatherCard mounted, assistant text landed) — only the reasoning
emission was missing.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@vercel

vercel Bot commented May 9, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
chat-with-your-data Ready Ready Preview, Comment May 9, 2026 5:08am
docs Ready Ready Preview, Comment May 9, 2026 5:08am
form-filling Ready Ready Preview, Comment May 9, 2026 5:08am
research-canvas Ready Ready Preview, Comment May 9, 2026 5:08am
travel Ready Ready Preview, Comment May 9, 2026 5:08am

Request Review

@github-actions

github-actions Bot commented May 9, 2026

Copy link
Copy Markdown
Contributor

📣 Social Copy Generator

Generate social media copies (Twitter/X, LinkedIn, Blog Post) for this PR using Claude.

  • Generate social media copies

This branch was successfully deployed

5 active deployments
Preview – travel — 46c5b568 Deployed May 9, 2026 by vercel[bot]
Preview – research-canvas — 46c5b568 Deployed May 9, 2026 by vercel[bot]
Preview – form-filling — 46c5b568 Deployed May 9, 2026 by vercel[bot]
Preview – docs — 46c5b568 Deployed May 9, 2026 by vercel[bot]
Preview – chat-with-your-data — 46c5b568 Deployed May 9, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant