chroma-core/chroma · error · ChromaValueError
txn.commit() cannot be called inside run()
Error message
txn.commit() cannot be called inside run()
What it means
Error "txn.commit() cannot be called inside run()" thrown in chroma-core/chroma.
Source
Thrown at clients/new-js/packages/chromadb/src/collection.ts:1462
uris: preparedRecordSet.uris,
});
}
public async delete({ ids }: { ids: string[] }): Promise<void> {
this.ensureOpen();
validateIDs(ids);
this.bufferWrite("delete", ids, {
ids,
where: null,
where_document: null,
limit: null,
});
}
public async commit(): Promise<ConditionalCommitResult> {
if (this.commitBlockedByRun) {
throw new ChromaValueError("txn.commit() cannot be called inside run()");
}
return this.commitAfterRun();
}
public async run<T>(
callback: (transaction: ConditionalCollectionTransaction) => T | Promise<T>,
options?: ConditionalTransactionRunOptions | number,
): Promise<T> {
const maxRetries = conditionalMaxRetries(options);
let attempt = 0;
while (true) {
const transaction = this.newAttempt(attempt);
transaction.commitBlockedByRun = true;
let value: T;
try {
value = await callback(transaction);View on GitHub (pinned to aecdd12c8a)
When it happens
Trigger: Thrown at clients/new-js/packages/chromadb/src/collection.ts:1462 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of chroma-core/chroma@aecdd12c8a (2026-08-16).
Data as JSON: /api/errors/90b85e0739831960.
Report an issue: GitHub.