JIXU DOCUMENTATION
Threads
Create, continue, pause, interrupt, inspect, and clear one durable Agent history.
A Thread is one durable, multi-turn history for one immutable Agent. It survives process boundaries because its State is reconstructed from ordered Events.
Create and open
const thread = await harness.createThread();
const sameThread = await harness.openThread(thread.id);
const knownThreads = await harness.listThreads();openThread() verifies compatibility with the Harness Agent before recovery begins. Unknown or incompatible durable data fails closed.
Send input
const state = await thread.send("Review the adapter and verify the public path.");
console.log(state.result);Input may contain ordered text and image parts. Image bytes live in digest-verified immutable Artifacts; Events carry references and placeholders rather than raw bytes.
When input arrives while a Thread is already running, Jixu records it in order and activates it only after the current turn reaches a safe terminal boundary.
Pause and continue
await thread.pause();
await thread.continue();Pause takes effect at a defined dispatch boundary. Continue resumes valid pending work in the same Thread; it does not create a new history.
Interrupt an active turn
await thread.interrupt();Interruption records intent before signalling active cancellable work. Public text already observed is preserved. Work that has not started is prevented from dispatching, and the Thread returns to ordinary input after a durable thread.interrupted boundary.
Interruption is not a resumable pause and does not claim to kill an already dispatched Tool.
Reasoning mode
await thread.setMode("ultra");
await thread.setMode("standard");Mode belongs to the Thread and survives Replay, reopen, clear, and Fork. Ultra requests the strongest compatible effort without changing the Agent, provider protocol, or selected model.
Clear presentation context
await thread.clear();Clear changes the visible context projection through a durable Event. It does not erase or rewrite the underlying Event history.