Skip to content

Commit 977d161

Browse files
Sync public snapshot from freebuff-private
1 parent cf47664 commit 977d161

2 files changed

Lines changed: 9 additions & 7 deletions

File tree

‎common/src/constants/turn-review.ts‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,14 @@ export const TURN_REVIEW_EVENT_KIND = 'turn_review'
4848
/** `codebuff_metadata` key that marks a review request. */
4949
export const TURN_REVIEW_METADATA_KEY = 'turn_review'
5050

51+
/**
52+
* How long a review may take, on every path (the runtime's request, a
53+
* Claude Code or Codex fork on the user's computer). A review may think as
54+
* long as it needs: a 4,000-token cap and 90 s limit failed 5.5% of reviews
55+
* (11-12), mostly a model's reasoning spending the whole budget.
56+
*/
57+
export const TURN_REVIEW_TIMEOUT_MS = 10 * 60_000
58+
5159
export const MAX_TURN_REVIEW_ACTIONS = 5
5260
const MAX_LABEL_CHARS = 60
5361
const MAX_PROMPT_CHARS = 1_000

‎packages/agent-runtime/src/turn-review.ts‎

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
readTurnReview,
1010
TURN_REVIEW_METADATA_KEY,
1111
TURN_REVIEW_PROMPT,
12+
TURN_REVIEW_TIMEOUT_MS,
1213
} from '@codebuff/common/constants/turn-review'
1314
import { TURN_REVIEW_EVENT } from '@codebuff/common/util/axiom-only-log'
1415
import { getErrorObject } from '@codebuff/common/util/error'
@@ -22,13 +23,6 @@ import type { ModelUsageData } from '@codebuff/common/types/contracts/llm'
2223
import type { Logger } from '@codebuff/common/types/contracts/logger'
2324
import type { Message } from '@codebuff/common/types/messages/codebuff-message'
2425

25-
/**
26-
* A review may think as long as it needs: no output cap beyond the agent's own,
27-
* and this generous limit. A 4,000-token cap and 90 s limit failed 5.5% of
28-
* reviews (11-12), mostly a model's reasoning spending the whole budget.
29-
*/
30-
export const TURN_REVIEW_TIMEOUT_MS = 10 * 60_000
31-
3226
/** Asks for the review. `history` must be what the agent's next request sends. */
3327
export async function reviewTurn(params: {
3428
history: Message[]

0 commit comments

Comments
 (0)