File tree Expand file tree Collapse file tree
packages/agent-runtime/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -48,6 +48,14 @@ export const TURN_REVIEW_EVENT_KIND = 'turn_review'
4848/** `codebuff_metadata` key that marks a review request. */
4949export 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+
5159export const MAX_TURN_REVIEW_ACTIONS = 5
5260const MAX_LABEL_CHARS = 60
5361const MAX_PROMPT_CHARS = 1_000
Original file line number Diff line number Diff line change 99 readTurnReview ,
1010 TURN_REVIEW_METADATA_KEY ,
1111 TURN_REVIEW_PROMPT ,
12+ TURN_REVIEW_TIMEOUT_MS ,
1213} from '@codebuff/common/constants/turn-review'
1314import { TURN_REVIEW_EVENT } from '@codebuff/common/util/axiom-only-log'
1415import { getErrorObject } from '@codebuff/common/util/error'
@@ -22,13 +23,6 @@ import type { ModelUsageData } from '@codebuff/common/types/contracts/llm'
2223import type { Logger } from '@codebuff/common/types/contracts/logger'
2324import 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. */
3327export async function reviewTurn ( params : {
3428 history : Message [ ]
You can’t perform that action at this time.
0 commit comments