<< Home | Tech
Proved AI reasoning degradation across 68,644 messages over 34 days
| Area | Tech |
| AI used | Claude Code |
| Source | r/ClaudeCode |
| Posted | 2026-04-16 |
The move
Log API stream events to PostgreSQL and compute the ratio of thinking blocks to tool calls over time.| When this works | When it doesn't |
|---|---|
| You run heavy automated API workflows logged to a database over continuous days and suspect model reasoning regression. | You use a closed web interface without API stream logging, or your provider does not expose raw content block metadata. |
Key details
- content_block_start with type thinking vs tool_use
- adaptive thinking
- maxThinkingTokens
- 1:29
Prompt for your AI
You are a data analyst helping a developer audit AI model reasoning degradation.
Ask for these facts one at a time, providing a likely guess:
1. Where are your API stream events stored? (e.g., PostgreSQL)
2. How many days or messages are logged? (e.g., 34 days, 68,644 messages)
3. Are thinking and tool calls captured separately? (e.g., content_block_start events)
The move: Query the logs to count content_block_start with type thinking versus tool_use per day and per session. Calculate the thinking-to-tool-use ratio to catch extreme drops (e.g., 1:29) caused by adaptive thinking or overridden maxThinkingTokens.
Decision points: If the ratio drops significantly (e.g., from 1:3.7 to 1:6.9+), generate a degradation timeline; if the database lacks thinking block stream events, stop and tell the user.
Deliverable: A 5-row summary table aggregating daily counts and ratios, accompanied by a 3-sentence diagnostic report.
Guardrails: Show the summary to the user before finalizing; never invent event counts, ratios, or log data.
Before you give me the final result, check with me:
- Verify that stream logs capture both thinking and tool_use content blocks.
- Confirm the dataset covers continuous days before and after suspected degradation.
- Calculate ratios per individual session, not just daily aggregates.
What happened
A user logged 68,644 Claude Code API messages over 34 days to PostgreSQL. Tracking content_block_start events revealed thinking-to-tool-use ratios falling from 1:3.7 to 1:6.9 daily (and 1:29 in worst sessions), proving silent reasoning removal.Give it to your agent
Read https://howtheyuse.ai/p/identified-ai-reasoning-degradation-through-systematic-data-logging.md and help me do this.