Sente — the coding agent CLI for teai.io,
benchmarked against Claude Code & Codex
We added Sente (先手, Japanese for "the initiative" in Go) to teai.io — a coding agent that runs in your terminal. It installs in one line and turns every teai.io model into an agent. Building it, we benchmarked it against Claude Code and Codex on the same task. The gap that showed up wasn't "which model is smarter" — it was "which client keeps its tools intact through the teai backend and actually finishes." Here's the measurement, and how we polished its accuracy.
- Sente installs in one line:
curl -fsSL https://teai.io/te | sh. The only client that runs through teai without breaking is Sente (because it's OpenAI-compatible natively). te maxswitches to Kimi K3 (2.8T, 1M context) in a single word. Cheap default for daily work, K3 when it counts.- Injecting coding rules measurably fixed "read before you write." Audit quality is bounded by the model's own judgment — raise that with
te max.
Getting started
curl -fsSL https://teai.io/te | sh
te # start the agent in the current directory
te run "explain this repo"
te max run "..." # max-performance mode = Kimi K3 (2.8T, 1M context)
te -m teai/<model> # switch model (te models to list)
Sente is a thin launcher on top of OpenCode — we did not fork it. It just points
OPENCODE_CONFIG at a teai.io-generated config, so it rides every upstream OpenCode improvement.
The model catalog (95+ today) auto-syncs from /te/config on every launch.
Why "Sente"
teai.io reads as "te-AI" — te (手) means "hand" in Japanese. We carried that hand
forward and named the agent after sente (先手), the Go term for taking the initiative.
The agent makes the first move for you. "Always keep sente" — never give up the initiative.
The command is short: te (a sente alias ships too).
Max-performance mode: te max = Kimi K3
Sente's default is glm-5.2, chosen for stability. The reason: Moonshot's flagship Kimi K3 (2.8T, 1M context) used to hang when streamed through OpenCode — no response came back. That has since been fixed in teai's streaming/fallback path, and Kimi K3 now works end to end. We re-verified it:
- SSE streaming:
role → content → stop → [DONE], terminates cleanly - streaming + tool calling:
tool_callscarries the right arguments,finish_reason:tool_calls - Sente end-to-end (OpenCode): K3 completes a file-write task (
Write K3.txt → Wrote file successfully)
So we added te max. It keeps the cost-efficient default (glm-5.2) but flips to maximum
performance in one word:
te max run "refactor this function and add tests"
te max # interactive mode on K3te (glm-5.2). When it counts: te max (K3).
Sente vs Claude Code vs Codex — same board
To keep it fair, we routed all three clients through the teai backend and had each audit our own code
(a 25,000-line http.rs, Rust axum). The task: "find one .unwrap() that can panic on
attacker-controlled input and write it to FINDING.md."
| Client | Behavior via teai | Result |
|---|---|---|
| Sente (OpenCode) | Sends OpenAI-compatible calls as-is. Zero conversion. | ran, no break |
| Claude Code | teai converts its Anthropic tool_use | broke on kimi-k3 |
| Codex | Custom function-call + sandbox | shell corruption |
On teai/kimi-k3, Claude Code emitted a <ctrl46> control token as text and never fired its
tools; Codex produced a broken shell command and died instantly with execvp() failed.
Neither is "the client's fault" — they happen because teai's OpenAI-compatible conversion layer can't
perfectly reproduce each vendor's tool format (Anthropic's tool_use, Codex's own format).
<ctrl46> collapse was root-caused
and fixed on the teai side after this benchmark ran (the real cause was tool_choice not
being propagated — not Claude Code or Kimi K3). On re-testing in production, Claude Code + teai/kimi-k3
now writes the file correctly and the <ctrl46> collapse no longer reproduces. The
benchmark above is a snapshot from that moment. Sente's structural edge — zero conversion layer, less to break —
still holds.
The honest part: finding quality hits the model's ceiling
But "ran to completion" ≠ "good audit." On the shared model (glm-5.2), all three clients
flagged a .unwrap() inside test code as a vulnerability — but attacker input never
reaches a #[test] block, so it isn't one. That's not a client difference; it's the model's
auditing ceiling. We cross-checked every finding against the real source to confirm.
Polishing: mechanical steps beat abstract rules
So we gave Sente a set of coding rules. On every launch it writes
~/.config/teai/sente-rules.md and injects it via the config's instructions field.
Research on AGENTS.md best practices agrees: concrete, mechanically-followable steps beat abstract
principles. So we turned the judgment into steps:
- Read before you write — never create a file or state a finding before opening the real code with a tool. No guessing line numbers or APIs.
- Mechanize test-code exclusion — "if the nearest marker above is
#[test]/mod tests, skip it," "surrounded byassert_eq!in the back half of the file ≈ test," "prefer handler lines (Json/HeaderMap/impl IntoResponse)." - Always ship the deliverable — don't stop after exploring; produce the artifact before ending the turn.
- Big files: grep first, then read the slice — never read 25,000 lines top to bottom (token savings).
The result was split. Before the rules, the agent would write a guessed line number before reading;
after, it reads the real code first and points at an actual .unwrap() line —
read-before-write was measurably fixed.
But test-code exclusion did not get fixed, even with mechanical steps. Even after spelling out
"skip it if the marker above is #[test]" and "assert-surrounded back-half = test," glm-5.2 keeps
picking a .unwrap() inside the trailing test module. That's not a wording problem — it's the
model's judgment ceiling.
te -m).
Bonus: we fixed a production bug while prepping the comparison
Setting up the comparison, we found a bug where teai's /v1/chat/completions was dropping
role:"tool" messages and the assistant's tool_calls (fixed and deployed). It broke the
tool loop for every agent that round-trips tools — not just Sente.
Summary
- Sente is teai.io's official coding agent CLI. One line:
curl -fsSL https://teai.io/te | sh. - The only client that runs through the teai backend without breaking is Sente (natively OpenAI-compatible).
- Injected rules measurably improved "read before you write / always deliver." Raise audit quality by picking the model —
te maxfor Kimi K3.