Skip to content

armgit / Ix

Public Imported from GitHub
0

Understand any codebase instantly. System intelligence for codebases, built for humans and AI.

feat(context): default --max-tokens to 3000

KageBinarye62424a07b00
diff --git a/ix-cli/src/cli/__tests__/context-pick-validation.test.ts b/ix-cli/src/cli/__tests__/context-pick-validation.test.ts
index 96ea368f..b7905786 100644
--- a/ix-cli/src/cli/__tests__/context-pick-validation.test.ts
+++ b/ix-cli/src/cli/__tests__/context-pick-validation.test.ts
@@ -117,7 +117,7 @@ describe("ix context --max-* validation", () => {
["--max-entities", "Maximum entities in the bundle", 50, 1, 500],
["--max-relationships", "Maximum relationships in the bundle", 100, 1, 1000],
["--max-evidence", "Maximum evidence items in the bundle", 25, 1, 200],
- ["--max-tokens", "Maximum tokens of evidence output", 1500, 500, 200000],
+ ["--max-tokens", "Maximum tokens of evidence output", 3000, 500, 200000],
] as const) {
// One assertion per flag, so a failure names which one lost its default
// rather than reporting that some string was missing from a wall of help.
diff --git a/ix-cli/src/cli/__tests__/context-token-budget.test.ts b/ix-cli/src/cli/__tests__/context-token-budget.test.ts
index 651dc1c1..518c726c 100644
--- a/ix-cli/src/cli/__tests__/context-token-budget.test.ts
+++ b/ix-cli/src/cli/__tests__/context-token-budget.test.ts
@@ -13,9 +13,9 @@ import {
describe("--max-tokens", () => {
it("is what bounds a default bundle, not 12,000 characters", () => {
const budgets = clampBudgets({});
- expect(budgets.maxTokens).toBe(1500);
- expect(budgets.maxChars).toBe(Math.round(1500 * BUNDLE_CHARS_PER_TOKEN));
- // The old default was nearly four times this.
+ expect(budgets.maxTokens).toBe(3000);
+ expect(budgets.maxChars).toBe(Math.round(3000 * BUNDLE_CHARS_PER_TOKEN));
+ // The old character default was nearly twice this.
expect(budgets.maxChars).toBeLessThan(12_000);
});
@@ -37,7 +37,7 @@ describe("--max-tokens", () => {
expect(budgets.maxChars).toBe(40_000);
// The token field still reports what it would have been, so --diff can say
// which budget the caller had in force.
- expect(budgets.maxTokens).toBe(1500);
+ expect(budgets.maxTokens).toBe(3000);
});
it("is refused alongside --max-chars rather than silently losing to it", () => {
diff --git a/ix-cli/src/cli/commands/context.ts b/ix-cli/src/cli/commands/context.ts
index 8ce91b33..8a21965f 100644
--- a/ix-cli/src/cli/commands/context.ts
+++ b/ix-cli/src/cli/commands/context.ts
@@ -62,7 +62,7 @@ const BUDGETS = [
{ key: "maxEntities", flag: "--max-entities", label: "entities", help: "Maximum entities in the bundle", min: 1, max: 500, fallback: 50 },
{ key: "maxRelationships", flag: "--max-relationships", label: "relationships", help: "Maximum relationships in the bundle", min: 1, max: 1000, fallback: 100 },
{ key: "maxEvidence", flag: "--max-evidence", label: "evidence", help: "Maximum evidence items in the bundle", min: 1, max: 200, fallback: 25 },
- { key: "maxTokens", flag: "--max-tokens", label: "tokens", help: "Maximum tokens of evidence output", min: 500, max: 200_000, fallback: 1_500 },
+ { key: "maxTokens", flag: "--max-tokens", label: "tokens", help: "Maximum tokens of evidence output", min: 500, max: 200_000, fallback: 3_000 },
{ key: "maxChars", flag: "--max-chars", label: "chars", help: "Maximum characters of evidence output", min: 1000, max: 1_000_000, fallback: 12_000 },
] as const satisfies ReadonlyArray<{
key: keyof BudgetSnapshot;
diff --git a/skills/ix/references/flags.md b/skills/ix/references/flags.md
index 6bae94aa..6e1cb951 100644
--- a/skills/ix/references/flags.md
+++ b/skills/ix/references/flags.md
@@ -48,8 +48,11 @@ surfaces (#575).
auto-paginates on its own; `--offset` or `--regions` turns that off, and
`--limit` only sets the page size.
- **`ix context` budgets the evidence block in tokens, not characters.**
- `--max-tokens` defaults to 1,500 and is converted at 2.14 characters per
- token, measured across 41 recorded bundles. `--max-chars` is still there for
+ `--max-tokens` defaults to 3,000 and is converted at 2.14 characters per
+ token, measured across 41 recorded bundles. At 1,500 the evidence block held
+ about ten items, and for a file target those were its own members: ix-bench
+ agents were shown 0.59 of the expected files ix had found, against all of
+ them at 3,000, for about 320 more tokens. `--max-chars` is still there for
a caller who needs exact bytes and overrides it; passing both is refused
rather than silently ranked, because the output does not say which one won.
- **`ix mcp` advertises ten tools by default**, not twenty-six: `ix_health`,
@@ -194,7 +197,7 @@ Build a bounded, deterministic context bundle for a symbol, file, or entity (or
| `--max-entities` | `<n>` | — | Maximum entities in the bundle (default: 50, clamped to 1-500) |
| `--max-relationships` | `<n>` | — | Maximum relationships in the bundle (default: 100, clamped to 1-1000) |
| `--max-evidence` | `<n>` | — | Maximum evidence items in the bundle (default: 25, clamped to 1-200) |
-| `--max-tokens` | `<n>` | `1500` | Maximum tokens of evidence output (clamped to 500-200000) |
+| `--max-tokens` | `<n>` | `3000` | Maximum tokens of evidence output (clamped to 500-200000) |
| `--max-chars` | `<n>` | — | Maximum characters of evidence output; overrides `--max-tokens` (clamped to 1000-1000000) |
| `--format` | `text\|json\|llm` | `text` | Output format — see [output-formats.md](output-formats.md) |
| `--pretty` | — | off | Indent JSON output; the default only when stdout is a terminal |