Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Troubleshooting

Audience: operators chasing a specific failure mode in production (file not found, permission errors, MCP transport issues, common error codes).

This page is organised by symptom. For per-code recovery detail (Message + Fixup templates), fetch metadata via the pulse_errors_lookup MCP tool ({"code": "PULSE_XXX"}) or pulse errors lookup CODE on the command line. The tool-errors-lookup skill explains the envelope shape, the DOMAIN_CATEGORY naming convention, and the repair workflow that chains predict-side suggestions into structured fixups.

LLM agents using MCP: call pulse_errors_lookup for per-code detail — code=PULSE_XXX for one code, domain=PULSE to enumerate, query="..." for keyword search. The skill is the orientation; the tool is the catalog. This page focuses on operational symptoms that don’t reduce to a single error code.

“data directory required: set PULSE_DATA_DIR or pass –data-dir”

pulse mcp refuses to start: it serves the cohorts under one base directory.

Fix: export PULSE_DATA_DIR in the client’s MCP config, or pass --data-dir /path/to/data on the command line. The pulse mcp page has the full example.

“file not found” / “no such file or directory”

The cohort path was resolved against the wrong base. CLI commands resolve a relative path against the working directory; pulse mcp, import auto / list / drop and a library instance resolve it against the data directory (PULSE_DATA_DIR, --data-dir or Options.DataDir). The SERVICE_RESOURCE message names the path it tried.

Fix: run pulse cohort inspect /absolute/path/data.pulse to confirm the file is where you think it is. Under pulse mcp, check the data directory on the stderr startup line.

“permission denied”

Pulse runs as your user; it does not escalate. When deployed as an MCP process under a different user (e.g. via launchd / systemd), the cohort directory and files must be readable by that user.

Fix: check which user the service runs as (the launchd / systemd unit), check the file mode with ls -l, and widen the group as needed.

“invalid pulse magic bytes” / “unsupported pulse format version”

The file isn’t a .pulse file — or it’s from a newer binary that introduced a format version this one cannot read (details.version names the byte, details.supported_versions the set this binary accepts). Upgrade Pulse, or re-import the source with this binary. The reader rejects unknown versions at parse time (see Header Layout) so a future binary doesn’t silently mis-decode an older file.

Fix: check the first nine bytes (hexdump -C path/to/data.pulse | head -1). The expected magic is 50 55 4c 53 45 00 00 00 followed by a version byte (0x01 or 0x02); PK is a shard archive and 28 b5 2f fd a transfer artifact (PULSE_COHORT_COMPRESSED).

“truncated pulse header”

The file is shorter than nine bytes or was cut off mid-write.

Fix: re-import. If you suspect a partial write, also check whether the writer was killed mid-flush — Pulse writes the header first, then the schema, then the records, so a truncated file usually fails here before any data is observed.

SERVICE_VALIDATION errors

A field name in the request doesn’t exist in the cohort, or an operator targets a field of the wrong type.

Fix: run pulse api predict on the same request — predict diagnoses validation failures without executing. Common cases: a typo in a field name; a numeric aggregation on a categorical field (PULSE_FIELD_TYPE_UNSUPPORTED, which Process raises too); a name used upstream of the operator that produces it. A combination that only forces buffering is not invalid: predict lists it in streamable_reasons.

PULSE_CHAIN_* errors

api process-chain (pulse_process_chain) runs only mergeable stages. A stage with a non-mergeable aggregator, grouper or attribute fails with PULSE_CHAIN_NOT_MERGEABLE: run that stage as its own api process call. A chain with no stage fails with PULSE_CHAIN_EMPTY. pulse api predict-chain reports both without running.

PULSE_CROSSTAB_* errors

Crosstab shape faults, refused by predict and the run alike:

  • PULSE_CROSSTAB_MISSING_CELL — the crosstab has no cell (or cells) aggregation. Add one: it is the value at every row × column intersection.
  • PULSE_CROSSTAB_NORMALIZE_LEVEL_WITHOUT_NESTED_AXIS / PULSE_CROSSTAB_NORMALIZE_WITHIN_WITHOUT_AXIS — normalize_level or normalize_within is set but normalize is not row or column.
  • PULSE_CROSSTAB_NORMALIZE_LEVEL_INCOMPATIBLE / PULSE_CROSSTAB_NORMALIZE_WITHIN_INCOMPATIBLE — either is set beside normalize: total, whose grand-total denominator has no axis to descend.
  • PULSE_CROSSTAB_NORMALIZE_LEVEL_OUT_OF_RANGE / PULSE_CROSSTAB_NORMALIZE_WITHIN_OUT_OF_RANGE — the depth is outside the axis: 0 is the first grouper, len(axis) − 1 the leaf. normalize_level counts on the normalized axis, normalize_within on the other one.

PULSE_IMPORT_* errors

Import-time failures. The most common:

  • PULSE_IMPORT_CATEGORICAL_OVERFLOW — more distinct values than a declared (--schema) categorical width holds; each overflowing row is skipped as a row error. Declare a wider rung (categorical_u16 / categorical_u32). Inferred types promote instead. See Dictionary Blocks.
  • PULSE_IMPORT_CATEGORICAL_UNBOUNDED — every sampled value of a string column is distinct (an ID or free text). Drop or bucket the column, or raise --sample-rows if it really is a category.
  • PULSE_IMPORT_DESCRIPTION_TOO_LONG — schema field description exceeds 1000 bytes. Trim it.
  • PULSE_IMPORT_SCHEMA_AMBIGUOUS — inference has nothing to sample: the source has no header columns or no data rows.
  • PULSE_IMPORT_ROW_ERROR: null value in non-nullable field — a null cell ("" / null / na / n/a) landed in a field your explicit --schema declared non-nullable. Mark the field "nullable": true in the schema JSON and re-import. (Inferred imports never raise this — see the promotion warning below.)

PULSE_IMPORT_NULL_PROMOTED

A warning, not an error. During an inferred import (no --schema), schema inference samples only the first --sample-rows (default 500) rows to decide nullability. If a null appears in a column past that window, Pulse promotes the field to nullable and finishes the import rather than failing — listing the promoted fields in the warning and in promoted_fields on the managed-import result. The written .pulse is correct.

Fix (optional): to make the schema exact up front, raise --sample-rows so the sample covers the null, or generate and edit a schema with pulse import schema-template (which already reports the accurate nullable flag) and re-import with --schema.

PULSE_IMPORT_WIDTH_PROMOTED

A warning, not an error. Inference sizes each categorical_* rung and integer width from the first --sample-rows rows. When a later value does not fit — the 257th distinct value of a categorical_u8 parent-name column, 70000 in a column the sample saw as u8, -3 or 2.5 in an integer column, 1e300 in a column the sample saw as f32 (under --float f32) — Pulse promotes the field to the narrowest type that holds it and imports the row. pulse convert does the same over an inferred schema instead of failing with PULSE_IMPORT_CATEGORICAL_OVERFLOW. Details name the field, the inferred from type, the written to type and the first source_row that forced it. No value changes.

Fix (optional): raise --sample-rows, or pin the type with column_type_overrides / --schema. A pinned type is a contract: a value past a --schema type is then a PULSE_IMPORT_ROW_ERROR, and one past a column_type_overrides type refuses the whole import with PULSE_IMPORT_OVERRIDE_INVALID — never a promotion (on pulse convert, a full declared categorical rung is the fatal PULSE_IMPORT_CATEGORICAL_OVERFLOW). A non-boolean in a packed_bool column never promotes either: it stays a row error.

PULSE_FIELD_DESCRIPTION_LOW_QUALITY

A warning by default, an error under --strict. The description is empty or under 10 bytes once trimmed (which catches placeholders such as "n/a" and "tbd").

Fix: edit the description in the schema JSON, re-import with --schema.

PULSE_EXPORT_FIELD_UNKNOWN

An export or convert --include (ExportJob.Includes / ConvertJob.Includes) names a field the source schema does not have. List the field names with pulse cohort inspect and fix the spelling.

Domain-wide codes

Each error domain has codes for failures no specific code describes. Look any code up with pulse_errors_lookup or pulse errors lookup CODE.

CodeMeaningWhat to do
SERVICE_REGISTRYThe request names an operator this instance does not registerFix the type spelling; check pulse --json (a feature profile may hide it)
DATA_PARSETabular input failed to parse at a rowFix the source row, or the delimiter / format flags
DATA_CONFIGAn import or export job is misconfigured (conflicting flags, unknown format, bad target)Read the message’s details; fix the job
DATA_CALCULATIONA value-level read failed, such as a field missing from a recordCheck the field names against the schema
CLI_COMMANDA CLI command failed to dispatchCheck the command and flags (pulse <command> --help)
CLI_OUTPUTOutput could not be written (a file error, an unsupported format)Check the output path and format
CLI_INTERNAL, DATA_INTERNAL, ENCODING_INTERNAL, PROCESSING_STATEAn internal invariant brokeA bug: report it with the request and the cohort’s schema

Two codes are never raised and exist only so a lookup resolves: PULSE_CROSSTAB_EMPTY_COLUMNS (a crosstab without column groupers runs with one implicit Total column) and PULSE_INDEX_UNSUPPORTED_SHARDED (point-lookup indexes accept shard archives).

MCP “tool not found” / “no tools registered”

An MCP client connects but sees no Pulse tools.

Fix: check the client’s MCP log (Claude Desktop surfaces this in ~/Library/Logs/Claude/). Common causes: pulse binary is not on PATH, the wrong working directory, or PULSE_DATA_DIR is not set in the MCP env block. Re-read pulse mcp.

mmap / file-mapping failures

A single-file .pulse cohort on a real directory is read through a memory map on Linux, macOS, FreeBSD and Windows. If your environment forbids mmap (some sandboxed containers, very locked-down macOS configurations), the reader falls back to a buffered read.

Fix: none needed; results are identical. The fallback reads the whole file into memory and skips parallel decode, so a large cohort there needs RAM for the file and runs serially.

Windows: a rewrite fails with ENCODING_IO / SERVICE_RESOURCE “renaming … onto …”. Another process (or your own code) still holds the cohort open or mapped, and Windows refuses to replace a file in use. The cohort is unchanged. Close the other reader and retry. See Tuning Limits.

When in doubt: predict, then process

Almost every “why doesn’t this work” question is answerable by

pulse api predict --request request.json --json

Predict reads only the header and schema — it never touches record data — and returns the full envelope of errors, warnings, and the streamable flag. A request predict calls valid: true can still fail on its data (a slot that fails keeps its identity and warns PULSE_SLOT_FAILED, a resource limit trips at run time); a run-time failure on a valid request with no data-dependent code is a bug worth reporting.