anthropics / anthropics/claude-agent-sdk-python

StructuredOutput gets in a loop

Đang mở
#775 0 bình luận 5 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
8.1k
Fork
1.3k
Merge trung bình
2 ngày 31 phút
Pull request đã merge (30 ngày)
1

Mô tả

Sometimes I have that `StructuredOutput` gets in a loop where it keeps trying to correct itself. It basically goes like this:

```
AssistantMessage(content=[TextBlock(text='\nfalse\nanswertext\n[]\n')], model='claude-sonnet-4-6'....
```

```
UserMessage(content=[TextBlock(text='Stop hook feedback:\nYou MUST call the StructuredOutput tool to complete this request. Call this tool now.')], uuid='191538a1-0dd7-415c-a728-50165282a087', parent_tool_use_id=None, tool_use_result=None)
```

And then it just keeps repeating the same pattern, it never calls the StructuredOutput tool, it just keeps on trying this odd `` type of text output. It somehow thinks that using `` is the same thing as calling it?

It also gets stuck inside this loop for WAY too long (basically until it hit the max budget), this should be restricted somehow.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.