Skip to content

fix: preserve Claude terminal outcomes - #428

Merged
alex-clickhouse merged 1 commit into
ClickHouse:mainfrom
bytehello:fix/292-claude-terminal-status
Sep 7, 2026
Merged

fix: preserve Claude terminal outcomes#428
alex-clickhouse merged 1 commit into
ClickHouse:mainfrom
bytehello:fix/292-claude-terminal-status

Conversation

@bytehello

Copy link
Copy Markdown
Contributor

Summary

Fixes #292.

The Claude backend now maps ResultMessage terminal signals onto the existing normalized turn states instead of hardcoding every result to completed:

  • aborted streaming or tool execution becomes interrupted
  • max-turn, API, and other error results become failed with an actionable error
  • successful results remain unchanged

This keeps the fix at the translator seam already shared by interactive and autonomous turns.

Validation

  • tests/test_engine.py: 91 passed
  • Python compile check passed
  • Full suite: 3380 passed; 6 existing MemU date tests failed under Asia/Shanghai because a timezone conversion produced the prior UTC date
  • The same MemU date group passes under UTC: 11 passed

No engine or persistence changes were needed.

@CLAassistant

CLAassistant commented Sep 7, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@alex-clickhouse alex-clickhouse self-assigned this Sep 7, 2026
@alex-clickhouse

Copy link
Copy Markdown
Collaborator

LGTM, thank you for the PR!

@alex-clickhouse
alex-clickhouse merged commit f83b825 into ClickHouse:main Sep 7, 2026
3 checks passed
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.

Claude backend silently swallows abnormal turn terminations (max_turns, API errors, aborts)

3 participants