Read execution journals
Record agent events and read the journal of a completed or failed dispatch.
Record a journal
Section titled “Record a journal”Each dispatch records its events in a journal by default. Set logging.transporter to choose its storage location, then use readJournal() to inspect the recorded events after the run.
result.logReference points to the finished journal. Without logging, Outpost writes it to a local transport in <repository>/.outpost/storage. To keep journals elsewhere, pass another transport: see Where data lives and S3 and R2.
Choose what to record
Section titled “Choose what to record”API reference: Logging.
Object options combine: { transporter, verbose: true, replayable: true }. A sandbox session takes logging once for all its dispatches, and each sandbox.dispatch() can override it.
Read a journal
Section titled “Read a journal”readJournal() returns the events in the order they happened. Each entry is a plain object: the event fields with its kind, plus at, seq, source, scope and the dispatch label when you set one.
API reference: ReadJournalOptions.
Reading fails if the journal exceeds the configured limits; it does not return a truncated transcript.
Understand recorded events
Section titled “Understand recorded events”API reference: ObservationEvent and AgentObservation.
dispatch-finished carries the status (done, failed or cancelled), completed, the token usage, the branch and commits, and the error code and message on failure. operation events carry their durationMs.
The built-in harness emits model-request and model-response only on a verbose hub. To record full model exchanges, pass one with verbose logging:
Record a run to replay it
Section titled “Record a run to replay it”logging: { replayable: true } stores each commit of the dispatch as a verified binary patch. createReplayAgent() then replays the journal without calling a model: see Replay without a model.
Find the journal of a failed dispatch
Section titled “Find the journal of a failed dispatch”A failed or cancelled dispatch still closes its journal with dispatch-finished, including a failure during preparation. The error carries the reference: read it with recoveryDetails().
Errors lists the other recovery details.
Remove old journals
Section titled “Remove old journals”Journals stay in their transport until you remove them. A retention policy with the closed-logs scope deletes closed journals older than a given age: see Retention and cleanup.
Limits
Section titled “Limits”- A journal is written by an observation hub receiver. It shares the hub’s bounded queue (
capacity,deliveryTimeoutMs): when its transport fails or falls behind, the journal can miss events, be disabled for the rest of the run or stay open, and the failure appears inresult.observerErrors(inrecoveryDetails(error)when the dispatch fails).readJournal()then returns the events written before the failure. - Journals hold prompts, agent messages and tool results, so they contain repository content. Store and share them like the code;
replayableadds the patches of every commit.
API: Logging · readJournal · ReadJournalOptions · DispatchResult · recoveryDetails · createObservationHub.