Synaxi-predict: I'm trying to predict token cost before it happens Synaxi-predict, a new tool from Synaxi, predicts the token cost, turn count, and pass rate of a Claude Code task before execution, enabling users to select the optimal model and avoid wasted tokens. The tool uses an MLP trained on ~53k agent runs and integrates with Claude Code to automatically record actual results for continuous improvement. It is part of the Synaxi ecosystem, which also includes a macOS app that reduces Claude API costs by stripping token waste. Predicts the cost, turn count, and pass rate of a Claude Code task before it runs — so you can pick the right model without wasting tokens on a bad fit. Closes the loop by capturing actual results and feeding them back into the model. Part of the Synaxi ecosystem. Synaxi https://synaxi.ai is a macOS app that cuts Claude API costs by stripping token waste from every request before it leaves your machine — deduplicating tool schemas, pruning stale conversation history, compressing verbose JSON, and more. Average reduction: 40%+ per request, with no code changes and under 1ms added latency. Free for personal use. synaxi-predict tackles the complementary problem: picking the right model before the task runs. Together they cover both sides of Claude cost control — less waste per token, and fewer tokens on the wrong model. /synaxi-predict Fix the failing migration │ ▼ Model Est. cost Turns Pass ───────────────────────────────────────────── single-haiku $ 0.35 28.1 8% ◀ recommended single-sonnet $ 0.62 18.4 11% │ ▼ you pick a model │ ▼ Subagent runs the task with the chosen model │ ├─ bin/parse-session reads the subagent's session JSONL │ → exact turns, token counts, real cost not estimated │ ├─ Eval agent checks git diff + test output → passed: true/false │ └─ bin/record-actual logs prediction vs. actuals → feeds back into next training run Predictions use an MLP trained on ~53k agent runs SWE-bench, SWE-smith, OpenHands, loong0814, real Claude Code runs . Input features: TF-IDF on task text + tree-sitter code complexity features from the current repo see Features features . Inside any Claude Code session: /plugin marketplace add BeadW/synaxi-predict /plugin install synaxi-predict On the next session start, Claude Code automatically: - Installs the Python package pip install -e - Downloads the model artifact ~190MB from GitHub Releases into your platform data directory ~/Library/Application Support/synaxi-predict/ on macOS, ~/.local/share/synaxi-predict/ on Linux Updates happen the same way — bump version in .claude-plugin/plugin.json , release, and the hook re-runs on next session. Copy .env.example to .env and add your ANTHROPIC API KEY if you plan to run benchmarks. git clone https://github.com/BeadW/synaxi-predict ~/synaxi-predict cd ~/synaxi-predict git lfs pull download trained model ~190MB pip install -e . In any Claude Code session, type: /synaxi-predict Fix the failing login migration Claude runs the predictor, shows the table, and asks which model you want. After you pick, it dispatches a subagent with that model, then automatically records the actual cost and turns against the prediction. Once installed, Claude invokes this skill automatically whenever it decides to spawn a subagent — no explicit command needed. The prediction table is computed at skill load time via dynamic injection tree-sitter code features included , so there's no extra tool call overhead. Predict for a task shows all models bin/predict "Add OAuth login" --repo-path /path/to/project Predict for Claude Code models only bin/predict "Add OAuth login" --models single --repo-path . List all supported models bin/predict --list-models Show model training date bin/predict --version Parse a subagent session for exact metrics agentId from Agent tool result bin/parse-session