feat(low-token): add --low-token mode for Pro/student plans#57
Merged
Conversation
A single CLI flag (--low-token) and matching plan field (low_token: true) activate a cost-saving preset: Sonnet lead instead of Opus, max-iterations 2 instead of 10, full-auto gates, no Haiku headlines, earlier auto- compaction. Estimated ~70-80% reduction (MNIST: ~$11 → ~$2-3). Override flags (--lead-model, --max-iterations, --no-headlines) compose with the preset. Precedence: CLI > plan > preset > base default. Comprehensive docs: new concepts/low-token-mode.mdx (FAQ, comparison, worked examples), reference/low-token-preset.mdx (one-page card), reference/cost-benchmark.mdx (methodology). Updates across the-plan.mdx, cli/overview.mdx, cli/build.mdx, quickstart.mdx, introduction.mdx, mint.json, README.md, COMMANDS.md. Benchmark harness scripts/benchmark_low_token.sh for measured MNIST cost comparison (one-time run; pending). Bug fix: docs/concepts/the-team.mdx frontmatter title was stale "Agents" (legacy from concepts/agents → concepts/the-team rename), now matches file path / nav. README test count badge synced 675 → 704. README "Built on" acknowledgements section: 11 deps + 3 planned optional integrations (ccusage, Repomix, caveman). +29 tests across 5 unit files + new integration test (704 total + 7 skipped). ruff src/zo/ clean. validate-docs 10/10. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
Deploying zero-operators with
|
| Latest commit: |
d4eef54
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://7b590292.zero-operators.pages.dev |
| Branch Preview URL: | https://claude-lucid-herschel-fece72.zero-operators.pages.dev |
SamPlvs
added a commit
that referenced
this pull request
Apr 27, 2026
Root cause of the persistent /concepts/the-team 404 on docs.zerooperators.com identified via direct HTTP probe: - Sibling pages return 200 (`/concepts/the-plan` etc.) — Mintlify build is current and serving fresh content. - `/concepts/the-team` returns 404 specifically — the page failed to compile, Mintlify excluded it from the build output. Cause: line 51 of the-team.mdx contained "files <500 lines, functions <50 lines" in prose. MDX 2's parser treats `<` followed by any non-whitespace as a JSX opening tag (digit is non-whitespace). `<500` becomes a malformed JSX attempt, the whole file fails compilation. Fix: replace `<500` / `<50` with natural-prose `under 500` / `under 50`. Same semantic meaning, parses cleanly. CLAUDE.md already uses the "under N lines" phrasing — this aligns the public docs with the source-of-truth coding-conventions text. Repo-wide sweep (see commit message body) confirms this was the only such pattern in any tracked .mdx file. After PR merges + Mintlify auto-redeploys, /concepts/the-team should return 200. Bonus fix in same commit: README test badge `tests-675_passing` → `tests-704_passing` was already done in PR #57; this commit also corrects a separate stale URL — README docs badge + docs/ README + STATE.md still referenced `docs.zero-operators.dev` (the originally-planned URL) instead of the actual deployed `docs.zerooperators.com` (no hyphen). Updated three files. DECISION_LOG entry for original Mintlify framework decision left intact as historical audit; STATE.md now records both the planning URL and the actual deploy URL with a note explaining the change. 706 tests pass + 7 skipped. ruff src/zo/ clean. validate-docs 10/10 (1 pre-existing test-count warning). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
SamPlvs
added a commit
that referenced
this pull request
Apr 27, 2026
…ch pending Records the session-024 work and explicitly verifies that agent teams mode (tmux launch + TeamCreate + Agent(team_name=...) + peer-to-peer SendMessage) is preserved across both default and low-token modes. STATE.md "Current Position" rewritten to lead with the session-024 hand-off so the next session picks up cleanly: PR #58 status (open + mergeable, 3 commits), the team-page 404 root cause + fix, the sub-agent model override fix, and the next manual action (mini-bench to verify whether Claude Code's Agent() honours the model parameter). DECISION_LOG appended with three new entries: 1. MDX dollar-sign rendering bug — escaped $ → \$ in 9 prose locations 2. Sub-agent model override architecture — _prompt_low_token_overrides() 3. the-team 404 root cause — MDX 2 prose <500 lines parser bug + URL correction (docs.zero-operators.dev → docs.zerooperators.com) New session summary at memory/zo-platform/sessions/session-024-2026-04-26.md covers the full session arc: PR #57 (merged) + PR #58 (open) feature list, partial bench findings, regression check proof, hand-off instructions for picking up the work. Test snapshot: 706 passed + 7 skipped. ruff src/zo/ clean. validate-docs 10/10 (1 pre-existing test-count warning). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
SamPlvs
added a commit
that referenced
this pull request
Apr 30, 2026
feat(low-token): add --low-token mode for Pro/student plans
SamPlvs
added a commit
that referenced
this pull request
Apr 30, 2026
Root cause of the persistent /concepts/the-team 404 on docs.zerooperators.com identified via direct HTTP probe: - Sibling pages return 200 (`/concepts/the-plan` etc.) — Mintlify build is current and serving fresh content. - `/concepts/the-team` returns 404 specifically — the page failed to compile, Mintlify excluded it from the build output. Cause: line 51 of the-team.mdx contained "files <500 lines, functions <50 lines" in prose. MDX 2's parser treats `<` followed by any non-whitespace as a JSX opening tag (digit is non-whitespace). `<500` becomes a malformed JSX attempt, the whole file fails compilation. Fix: replace `<500` / `<50` with natural-prose `under 500` / `under 50`. Same semantic meaning, parses cleanly. CLAUDE.md already uses the "under N lines" phrasing — this aligns the public docs with the source-of-truth coding-conventions text. Repo-wide sweep (see commit message body) confirms this was the only such pattern in any tracked .mdx file. After PR merges + Mintlify auto-redeploys, /concepts/the-team should return 200. Bonus fix in same commit: README test badge `tests-675_passing` → `tests-704_passing` was already done in PR #57; this commit also corrects a separate stale URL — README docs badge + docs/ README + STATE.md still referenced `docs.zero-operators.dev` (the originally-planned URL) instead of the actual deployed `docs.zerooperators.com` (no hyphen). Updated three files. DECISION_LOG entry for original Mintlify framework decision left intact as historical audit; STATE.md now records both the planning URL and the actual deploy URL with a note explaining the change. 706 tests pass + 7 skipped. ruff src/zo/ clean. validate-docs 10/10 (1 pre-existing test-count warning). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
SamPlvs
added a commit
that referenced
this pull request
Apr 30, 2026
…ch pending Records the session-024 work and explicitly verifies that agent teams mode (tmux launch + TeamCreate + Agent(team_name=...) + peer-to-peer SendMessage) is preserved across both default and low-token modes. STATE.md "Current Position" rewritten to lead with the session-024 hand-off so the next session picks up cleanly: PR #58 status (open + mergeable, 3 commits), the team-page 404 root cause + fix, the sub-agent model override fix, and the next manual action (mini-bench to verify whether Claude Code's Agent() honours the model parameter). DECISION_LOG appended with three new entries: 1. MDX dollar-sign rendering bug — escaped $ → \$ in 9 prose locations 2. Sub-agent model override architecture — _prompt_low_token_overrides() 3. the-team 404 root cause — MDX 2 prose <500 lines parser bug + URL correction (docs.zero-operators.dev → docs.zerooperators.com) New session summary at memory/zo-platform/sessions/session-024-2026-04-26.md covers the full session arc: PR #57 (merged) + PR #58 (open) feature list, partial bench findings, regression check proof, hand-off instructions for picking up the work. Test snapshot: 706 passed + 7 skipped. ruff src/zo/ clean. validate-docs 10/10 (1 pre-existing test-count warning). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--low-tokenCLI flag (andlow_token: trueplan YAML field) activates a cost-saving preset: Sonnet lead instead of Opus, max-iterations 2 instead of 10, full-auto gates, no Haiku headlines, earlier auto-compaction (CLAUDE_AUTOCOMPACT_PCT_OVERRIDE=60). Estimated ~70-80% reduction (MNIST: ~$11 → ~$2-3).--lead-model {opus,sonnet,haiku},--max-iterations N,--no-headlinescompose with the preset. Precedence: CLI > plan > preset > base default.concepts/low-token-mode.mdx(FAQ + comparison + worked examples),reference/low-token-preset.mdx(one-page card),reference/cost-benchmark.mdx(methodology). Updates acrossthe-plan.mdx,cli/{overview,build}.mdx,quickstart.mdx,introduction.mdx,mint.json,README.md,COMMANDS.md.scripts/benchmark_low_token.shfor measured MNIST cost comparison (one-time run; pending).docs/concepts/the-team.mdxfrontmatter title was stale"Agents"(legacy fromconcepts/agents→concepts/the-teamrename); now matches file path / nav. Resolves user-reported 404 on Mintlify cached deploys. README test-count badge synced 675 → 704.src/zo/clean. validate-docs 10/10.Out of scope (deliberately)
Prompt caching, Batch API, Files API, extended thinking budgets — all require switching ZO from
claudeCLI launcher to direct Anthropic SDK. Substantial refactor, separate PR conversation. The architectural constraint is the answer for v1 of this feature.External-tool integrations (caveman, Repomix, ccusage, claude-code-cache-fix) deferred to follow-up PRs after the internal preset gets real-world validation. Acknowledged in README as "Optional integrations (planned)".
Test plan
uv run pytest -q— 704 + 7 skipped passuv run ruff check src/zo/— clean./scripts/validate-docs.sh— 10/10uv run zo build --help—--low-token,--lead-model,--max-iterations,--no-headlinesrender with descriptionsuv run zo continue --help— same four flags present_show_banner(low_token=True)shows[low-token]textlow_token: trueandlead_model: sonnet; verify both fields land onPlanFrontmatter## Experiment Loop max_iterations: 8wins over low-token clamp of 2;--max-iterations 4CLI override wins over plan + presetcd docs && mintlify dev— confirm new pages render under "Concepts" and "Reference" groups; "the team" page resolves with title "The team"./scripts/benchmark_low_token.sh(~$13-14 spend, ~75min wall time) — scheduled follow-up agent (2026-05-10) will pick up the results once abenchmark-results-*.jsonis committed to the repo🤖 Generated with Claude Code