@dreb/coding-agent 2.23.0 → 2.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -493,6 +493,19 @@ dreb.on("stream_retry", async (event, ctx) => {
493
493
  });
494
494
  ```
495
495
 
496
+ #### length_retry
497
+
498
+ Fired when a turn ends with `stopReason: "length"` (the model exhausted its output token budget mid-response) and dreb discards the truncated partial before retrying with a larger `maxTokens` budget. If all retries are exhausted (or the budget already sits at the model's ceiling), the turn fails loudly instead with an error message ("Response truncated at token limit after N attempts") rather than returning a silently truncated response.
499
+
500
+ ```typescript
501
+ dreb.on("length_retry", async (event, ctx) => {
502
+ // event.attempt, event.maxAttempts
503
+ // event.previousMaxTokens - the budget used for the truncated attempt
504
+ // event.nextMaxTokens - the escalated budget the retry will request
505
+ // event.discardedPartial - partial assistant message discarded before retry (debug/instrumentation only)
506
+ });
507
+ ```
508
+
496
509
  #### tool_execution_start / tool_execution_update / tool_execution_end
497
510
 
498
511
  Fired for tool execution lifecycle updates.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dreb/coding-agent",
3
- "version": "2.23.0",
3
+ "version": "2.24.0",
4
4
  "description": "Coding agent CLI with read, bash, edit, write tools and session management",
5
5
  "type": "module",
6
6
  "drebConfig": {