/consensus Is the caching approach in src/core/storage safe for concurrent writes?
Titah runs each available external agent in parallel, shows each answer as its own block, then uses its own model to synthesise: what they agree on, where they differ, and which is wrong.
Disagreement is the point
The synthesis prompt explicitly forbids inventing agreement that is not there.
Disagreement is the most valuable information consensus produces — it is the reason you asked several agents instead of one. A synthesis that files the edges off and reports a clean consensus has thrown away the only thing that justified the cost.
Honest notes on cost and time
/consensus calls every available agent, so the $ shown is the sum of what
each reported.
- For Claude Code on a subscription that figure is an API-price equivalent, not a bill. What is actually consumed is rate-limit quota.
- What you will feel more is time: consensus waits for the slowest agent.
Disable agents you do not want:
{ "externalAgent": { "opencode": { "enabled": false } } }
Partial results are reported as partial
- If only one agent answers, Titah says so rather than pretending it was a consensus.
- Agents that fail are still reported, never silently dropped. A consensus quietly computed from two of four agents is a lie about how much evidence you have.
Why this is safe to run concurrently
Titah’s stance elsewhere is that concurrency needs a bound — see Sub-agents. Consensus violates the “no concurrency” default, but the concurrency here is flat and bounded by the number of configured agents rather than recursive. Nothing a consensus run spawns can spawn more.
That distinction is what makes it safe, and it is also the one feature that makes Titah more than a less mature opencode — which is why it shipped in v1.
When to reach for it
Consensus earns its cost on questions where being wrong is expensive and the answer is genuinely contestable:
- “Is this concurrency-safe?”
- “Will this migration lose data if it runs twice?”
- “Is this the right abstraction, or am I about to lock in a bad interface?”
It is a poor fit for questions with one checkable answer — “how many .ts files
are in src/?” — where one agent, or one glob call, is both cheaper and more
reliable.