Appearance
Optimize
Every run starts with the same expensive step: an agent orienting itself in a codebase it has never seen. Optimize removes most of that. Turn it on for a Lane and Tenbi pre-digests each of the Lane's repos into hosted knowledge the agents draw on — so runs start already knowing the codebase and spend fewer tokens (and less time) exploring. It costs a bit up front, then saves on every run after — the same trade as prompt caching.
What Tenbi builds
Generation produces two artifacts per repo, both hosted by Tenbi:
- A codebase map — a multi-page picture of where things live and how data flows through the repo. Agents consult it on demand: they look up only the parts relevant to the ticket at hand, instead of re-reading the codebase to find them.
- A conventions guide — a one-page summary of how to build here: the stack, build and test commands, and the repo's conventions. It's present from the moment every run starts, so agents follow your house rules without having to rediscover them.
If a repo already has an AGENT.md, generation reads it and folds it into the guide — your file is never modified.
Neither artifact is ever committed to your repository. No files appear in your repo, no PR opens; everything lives on Tenbi's side.
Turning it on
Open the Lane form, go to the Agent Context tab, and check Optimize this Lane's repos in the Optimize section. On a brand-new Lane, save first — the generation controls appear once the Lane exists.
Enabling the checkbox doesn't generate anything by itself. Generation starts in exactly two ways:
- Automatically, at ticket pickup — the first time a ticket needs artifacts that don't exist yet (see below).
- Manually, via the Generate Now button on the Lane.
Tip: press Generate Now right after enabling. Generation takes a while (it's a real agent run over each repo), and pre-building means your first ticket doesn't have to wait for it.
The first ticket waits — once
When a ticket is picked up on an Optimize Lane and one of its repos has no artifacts yet, the ticket holds in Queued while Tenbi generates them in the background — this is the "waiting for artifacts" case you'll see on the Dashboard. Once the artifacts exist, the ticket runs optimized, like every ticket after it. Only one generation runs per repo at a time, even if several tickets are queued behind it.
This wait happens only on first generation. Later rebuilds never hold a ticket (see Staying fresh). And if generation recently failed, Tenbi doesn't hold tickets hostage: they're admitted and run un-optimized — normal runs, just without the head start — until a generation succeeds.
Per-repo status and Generate Now / Rebuild Now
On a saved Lane with Optimize enabled, the Optimize section lists every repo with its status:
- Generated — with last built (how long ago) and the short commit the artifacts were built from, so you can see at a glance how current they are.
- Not generated yet — no artifacts exist for this repo.
Below the list is the generation button. It reads Generate Now when nothing has been built yet and Rebuild Now once artifacts exist; either way it runs generation for every repo on the Lane, rebuilding from the current state of each base branch. Save the Lane first if you changed repos or base branches — generation uses the saved configuration.
When you trigger generation manually, it shows up on the Dashboard as an Optimization record per repo, so you can watch it progress and see whether it finished or failed. Automatic (pickup-triggered) generation runs quietly in the background. Either way, generation records report status only — the artifact contents aren't browsable.
Cost: generation runs bill the same Claude credential as your normal runs — it's an agent surveying your repo on your model key. Expect a sizable one-time run per repo, then savings on the runs that follow.
Staying fresh
You don't have to manage freshness — Tenbi does. When a ticket is picked up on an Optimize Lane, Tenbi checks whether the repo's artifacts are still current: they're rebuilt when they get old, or when the repo's structure has drifted since the last build. Files being added, removed, or moved count far more than in-place edits — that's what invalidates a navigational map; heavy editing inside existing files mostly doesn't.
A stale artifact never blocks a run: the existing map and guide keep serving the current ticket while the rebuild happens in the background, and the next run picks up the fresh version. Only the very first generation holds a ticket.
After a big refactor — a directory restructure, a framework swap — press Rebuild Now if you'd rather not wait for the automatic refresh.
The run badge
Every run row on the Dashboard and on Record Detail carries a small lightning-bolt icon showing whether that run actually used its Lane's optimization: lit in the accent color when it did, grey when it didn't. Hover it to read Optimized or Not Optimized.
Grey is normal on Lanes without Optimize. On an Optimize Lane, a grey badge usually means the run went ahead un-optimized — for example, it was admitted while generation was failing.
When generation fails
A failed generation never breaks your Lane: ticket runs keep working, they just run without optimization until a generation succeeds. To retry, press Generate Now (or Rebuild Now) on the Lane. Because generation runs on your Claude credential, a rejected key fails generation the same way it fails normal runs — check Troubleshooting → Model key invalid if failures coincide with credential changes. The full triage checklist is in Troubleshooting → Optimization run failed.
Privacy
The artifacts describe your code, so they're handled accordingly:
- They are never written to your repository — no commits, no PRs, no files in your worktree.
- They are stored by Tenbi, scoped to your account, and used to serve your Lane's runs. The data is private to Tenbi.
- Their contents aren't viewable — in the app you see status (generated, last built, commit), not the artifact text.
- Your own
AGENT.md, if present, is read during generation and never modified.
To stop using Optimize on a Lane, uncheck Optimize this Lane's repos — runs go back to exploring the codebase directly.