Repository navigation
Commit c6bb998
committed
fix(server): a full Claude context window no longer shows as a usage limit
Claude ends a turn with terminal_reason "blocking_limit" both when a plan
limit blocks the request and when the context window is full ("Prompt is
too long"). The adapter treated every blocking_limit as a usage limit, so a
full context showed "Usage limit reached" with no reset time, and retrying
could never work.
blocking_limit is now a usage limit only with rate-limit evidence (a
rejected rate_limit_event or a rate_limit assistant error), as already
decided for other terminal reasons. Without it the turn fails as a
provider error that says the context window is full and points to /compact
or a new thread.
Refs #198321 parent 339179f commit c6bb998
2 files changed
Lines changed: 81 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2211 | 2211 | | |
2212 | 2212 | | |
2213 | 2213 | | |
2214 | | - | |
| 2214 | + | |
| 2215 | + | |
| 2216 | + | |
| 2217 | + | |
| 2218 | + | |
| 2219 | + | |
| 2220 | + | |
2215 | 2221 | | |
2216 | 2222 | | |
2217 | 2223 | | |
| |||
2221 | 2227 | | |
2222 | 2228 | | |
2223 | 2229 | | |
2224 | | - | |
| 2230 | + | |
2225 | 2231 | | |
2226 | 2232 | | |
2227 | 2233 | | |
| |||
4639 | 4645 | | |
4640 | 4646 | | |
4641 | 4647 | | |
4642 | | - | |
4643 | | - | |
4644 | | - | |
4645 | | - | |
| 4648 | + | |
4646 | 4649 | | |
4647 | 4650 | | |
4648 | 4651 | | |
| |||
4662 | 4665 | | |
4663 | 4666 | | |
4664 | 4667 | | |
| 4668 | + | |
| 4669 | + | |
| 4670 | + | |
| 4671 | + | |
| 4672 | + | |
| 4673 | + | |
| 4674 | + | |
| 4675 | + | |
| 4676 | + | |
| 4677 | + | |
| 4678 | + | |
| 4679 | + | |
| 4680 | + | |
| 4681 | + | |
| 4682 | + | |
| 4683 | + | |
| 4684 | + | |
| 4685 | + | |
| 4686 | + | |
| 4687 | + | |
| 4688 | + | |
| 4689 | + | |
| 4690 | + | |
| 4691 | + | |
| 4692 | + | |
| 4693 | + | |
| 4694 | + | |
| 4695 | + | |
| 4696 | + | |
| 4697 | + | |
| 4698 | + | |
| 4699 | + | |
| 4700 | + | |
| 4701 | + | |
| 4702 | + | |
| 4703 | + | |
| 4704 | + | |
| 4705 | + | |
| 4706 | + | |
| 4707 | + | |
| 4708 | + | |
| 4709 | + | |
| 4710 | + | |
| 4711 | + | |
| 4712 | + | |
| 4713 | + | |
| 4714 | + | |
| 4715 | + | |
| 4716 | + | |
| 4717 | + | |
| 4718 | + | |
| 4719 | + | |
| 4720 | + | |
| 4721 | + | |
| 4722 | + | |
| 4723 | + | |
| 4724 | + | |
| 4725 | + | |
| 4726 | + | |
| 4727 | + | |
| 4728 | + | |
| 4729 | + | |
| 4730 | + | |
| 4731 | + | |
4665 | 4732 | | |
4666 | 4733 | | |
4667 | 4734 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2618 | 2618 | | |
2619 | 2619 | | |
2620 | 2620 | | |
| 2621 | + | |
| 2622 | + | |
| 2623 | + | |
2621 | 2624 | | |
2622 | 2625 | | |
2623 | 2626 | | |
| |||
2636 | 2639 | | |
2637 | 2640 | | |
2638 | 2641 | | |
2639 | | - | |
| 2642 | + | |
| 2643 | + | |
| 2644 | + | |
2640 | 2645 | | |
2641 | 2646 | | |
2642 | 2647 | | |
2643 | | - | |
| 2648 | + | |
2644 | 2649 | | |
2645 | 2650 | | |
2646 | 2651 | | |
| |||
2817 | 2822 | | |
2818 | 2823 | | |
2819 | 2824 | | |
2820 | | - | |
2821 | | - | |
2822 | | - | |
| 2825 | + | |
2823 | 2826 | | |
2824 | 2827 | | |
2825 | 2828 | | |
| |||
0 commit comments