← Back

← All guides · Published November 14, 2026 · Reviewed November 14, 2026 · Ingenious AI team

Missing Sequence Numbers in Agent Logs: What They Mean

The short answer

A missing sequence value means an entry the counter says should exist is not in the log — most often a restart window, a crashed writer or an import that dropped rows — and a duplicate means the pipeline wrote an entry twice. Both are integrity signals, never proof of tampering, and both matter for the same reason: a forensic conclusion is only as strong as the completeness of the record it was drawn from. Check your own log with the free log scan.

Scan my log — free

What is a missing sequence value?

Sequence values — emitted as seq, sequence, index or event_index — are the per-agent counters BoundaryVault's integrity audit uses to witness completeness. The audit reports missing values, duplicates, and the silent gaps they create, as indicators for the operator to explain.

The counter is a witness, not a decoration

A monotonically increasing per-agent counter turns absence into evidence. Without it, a log missing an hour looks identical to a quiet hour. With it, the hole has edges: values 41,209 to 43,508 are absent, which tells you when the record broke, how much is gone (or was never written), and which findings around the hole deserve an asterisk. That is why adding a counter is the cheapest forensic upgrade a framework can make — it costs one integer per entry and buys provable completeness, or provable incompleteness, which is the next best thing.

The three usual causes

Restarts: the writer stops mid-stream and resumes with a fresh buffer, losing the tail — classically paired with a truncated final entry before the gap. Crashes and dropped writes under load: entries generated by the agent but never persisted, which no downstream tool can distinguish from entries that never happened. Imports and merges: a migration between log systems drops rows at a boundary, or two sources overlap and the dedupe removes the wrong twin. Notice what is absent from the list, most of the time: an editor deleting exactly the incriminating entries. The audit cannot rule that out — it can only show you the hole and ask for the explanation your operations records should be able to give.

Duplicates are the mirror problem

A retrying exporter or a stitched import writes some entries twice. Duplicates flatter completeness while corrupting counts: an action appears to have happened twice, a crossing-chain reading can see a doubled transform step, and your storage math quietly doubles a slice of the week. The audit flags duplicate sequence values and duplicate entries so you can fix the writer, not the log: repair at the pipeline (idempotent writes keyed on the sequence value), because hand-editing the retained record to remove duplicates destroys the very trustworthiness the audit exists to witness.

Answering for a gap in a review

When a packet covers a gappy period, the operator notes carry three facts: the window the gap covers, the cause as established from operations records (restart logs, deploy history), and the consequence — which findings, if any, fall inside or beside the hole and therefore rest on partial evidence. That short paragraph converts a weakness into demonstrated command of your own record. Reviewers forgive a restart; they do not forgive discovering the gap themselves. If the cause cannot be established, say exactly that and say what you changed so the next gap will be explainable — a counter plus a restart marker entry makes future holes self-labelling.

A worked example: Harbor Lane Legal

Example — fictional operator, illustrative numbers. Harbor Lane Legal, a fictional document-intake firm, explained a 1,742-value gap in its intake agent's log during a customer review. Deploy records showed a framework restart at the gap's first missing value; exporter logs showed 96 duplicate entries written on recovery, when the buffer replayed. The gap covered 11 minutes of a low-volume evening, contained 0 findings, and was written up in the packet's operator notes with the restart reference. The fix — idempotent writes keyed on sequence, and a restart marker entry — meant the next quarter's 890,000 actions audited with 0 missing and 0 duplicate values.

MeasureFigureWhat it showed
Missing values explained1,742An 11-minute restart window
Duplicate entries on recovery96Buffer replay; fixed with idempotent writes
Findings inside the gap window0Stated in the operator notes
Next quarter890,000 actions0 missing, 0 duplicate

See how the plans differ on log size and batch work on the pricing page, and how the detector reads a log in the detector docs.

The checklist: five actions

  1. Emit a per-agent counter. Seq, sequence, index or event_index — one integer per entry is the cheapest completeness witness there is.
  2. Make writes idempotent. Key persistence on the sequence value so retries and recoveries cannot double-write.
  3. Mark restarts in the record. A restart marker entry turns future gaps into self-labelling events.
  4. Explain gaps in the notes. Window, established cause and consequence for findings — written where a reviewer will find it.
  5. Fix the pipeline, never the record. Do not hand-edit retained logs; repair the writer and let the next period audit clean.

Run the free log scan · More agent-security tools from Ingenious AI

Related guides

Agent Log Integrity Audit: What the Gap Checks Mean

Duplicate Entries in Agent Logs: What They Mean and How to Stop Them

Timestamp Problems in Agent Logs: Order Breaks and Clock Jumps

How Long Should You Keep AI Agent Logs? An Audit-Trail Retention Guide

Agent Log Forensics: Finding Credential Grabs After the Fact

What Is Scope Escape in an AI Agent?

Building a Disclosure Packet After an Agent Incident

Putting sequence values into a log that lacks them

Retrofitting a counter is a writer change, and it should start at a declared boundary: a deploy, a version bump, a dated note in the scope config saying sequence begins here. Entries before the boundary stay unsequenced and are judged as such — do not back-fill numbers into old entries to make the history look uniform. Back-filled counters are worse than absent ones, because they convert an honest limitation into a fabricated witness.

From the boundary onward, hold the line on one rule: the counter increments at write time, in the writer, never reconstructed at export. An export that assigns sequence by row order is manufacturing the appearance of completeness — the export cannot know about the entry the writer dropped. The counter's whole value is that it was present when the events happened.

Talking about a gap without overclaiming

The sentence to practise is the bounded one: 'Between sequence 4,102 and 4,117, fifteen entries the counter expects are absent from the export; the window coincides with the March restart, and platform records show no actions in that interval.' Every clause is checkable, the uncertainty is located precisely, and nobody hearing it can inflate it into 'the logs were tampered with' or deflate it into 'nothing happened'. Reviewers repeat your sentences back in rooms you are not in. Write sentences that survive the repetition.

The same discipline applies in reverse. If the cause was not established, the note says that, with the bounds of what was checked. An inventoried unknown strengthens everything around it; a gap dressed in a confident story it has not earned contaminates the findings that share its page.

Frequently asked questions

What does a missing sequence value mean?

An entry the counter indicates should exist is absent from the log — most often a restart, a dropped write or an import loss. It is an integrity signal, never proof of tampering.

What causes duplicate sequence values?

Retrying exporters, buffer replays after a crash, and stitched imports. They inflate counts and can make one real action look like two.

Should I delete duplicates from the retained log?

No. Editing the retained record undermines its trustworthiness. Fix the writer with idempotent writes keyed on the sequence value, and explain the affected period in the operator notes.

How do I explain a gap to a reviewer?

State the window it covers, the cause established from operations records, and which findings rest on partial evidence because of it. An explained gap strengthens a packet; an unexplained one weakens it.

My framework emits no sequence values. What now?

Add a simple per-agent counter at the logging layer. Without sequence values the integrity audit loses its completeness signals and a partial log looks whole.