MCPcopy Create free account
hub / github.com/codeaashu/claude-code / getEnvMaxTokens

Function getEnvMaxTokens

src/tools/FileReadTool/limits.ts:24–33  ·  view source on GitHub ↗

* Env var override for max output tokens. Returns undefined when unset/invalid * so the caller can fall through to the next precedence tier.

()

Source from the content-addressed store, hash-verified

22 * so the caller can fall through to the next precedence tier.
23 */
24function getEnvMaxTokens(): number | undefined {
25 const override = process.env.CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS
26 if (override) {
27 const parsed = parseInt(override, 10)
28 if (!isNaN(parsed) && parsed > 0) {
29 return parsed
30 }
31 }
32 return undefined
33}
34
35export type FileReadingLimits = {
36 maxTokens: number

Callers 1

limits.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected