Skip to main content
Version: MVP

Gateway troubleshooting

5 min readFor operatorsUpdated 2026-05-19

What you'll do

Diagnose the v0.8.0 gateway surfaces — setup · diagnostics · channels · webhooks · schedules · policies · receipts — using safe commands that don't expose secrets.

Gateway daemon is foreground and health-checkable.

v0.8.0 ships craik gateway start, persisted runtime state, and a local /health endpoint. A production dispatch loop is not part of the MVP.

Baseline checks

craik doctor

Expected output: JSON with checks for local home, local store, memory backend, gateway prerequisites, and gateway policy readiness.

craik setup --disable-gateway

Expected output: secrets_written = false and a local-only gateway configuration. Do not put channel tokens, webhook secrets, or bearer credentials in Craik config payloads.

Setup problems

SymptomCheckResolution
Gateway config is missingcraik doctor reports gateway config warningsRun craik setup and review the JSON output.
Public bind is rejectedSetup or validation reports missing policyAdd a policy envelope before using a public bind host.
Secrets appear in outputReview setup output and receiptsMove secrets to the provider-specific secret store and rotate exposed credentials.

Channel problems

SymptomCheckResolution
Message is normalized but not authorizedInspect pairing, allowlist, and policy decisionsPair the identity, add an allowlist rule, then select a channel policy.
Sender remains unpairedInspect channel identity pairing stateComplete an explicit pairing flow with audit links.
Sender was revokedPairing state is revokedCreate a new approved pairing if access should be restored.
Event is denied by allowlistDecision reason is no enabled allowlist rule matchedAdd or enable a narrow rule for the sender, workspace, thread, or metadata.

Webhook problems

SymptomCheckResolution
Request is invalidIngress reason says signature is missing or invalidRecompute the X-Craik-Signature value over the raw body.
Body is rejectedIngress reason says body is too large, too deep, or not a JSON objectSend a bounded JSON object with event_id, event_type, and timestamp.
Timestamp is rejectedIngress reason says timestamp is outside the allowed windowResend with a fresh timestamp and verify sender clock skew.
Event is duplicateIngress status is duplicateTreat the event as already handled; don't dispatch twice.
Event type is unauthorizedIngress status is unauthorizedAdd the event type to the configured allowlist only if intended.

Schedule problems

SymptomCheckResolution
Schedule is rejectedValidation says five fields are requiredUse a five-field cron-like expression.
Schedule token is rejectedValidation reports unsupported cron fieldUse only digits, *, /, ,, and -.
Schedule is too frequentValidation reports the five-minute minimumUse a minute field such as */5, */15, or a sparse explicit list.
Task is not createdResult says tick already created a taskUse the existing task for that tick.
Automation does not runResult status is disabledEnable the automation after reviewing policy and receipts.
Automation is policy deniedResult status is policy_deniedAdd gateway.schedule.execute only to the intended policy envelope.

Policy and receipt problems

SymptomCheckResolution
Channel action is deniedReceipt status is deniedInspect requested capability and channel policy boundaries.
Local operator capability is unavailablePolicy denies shell.execute, repo.write, or similarUse a local operator workflow instead of channel ingress.
Receipt lacks payload textredacted_fields includes payload fieldsExpected — gateway receipts omit sensitive channel data.
Receipt link is missingCheck policy, channel, task, and identity idsRecreate the gateway decision with complete context before dispatch.

Safe diagnostic commands

craik doctor

craik setup --disable-gateway

craik update

For development validation:

uv run --extra dev ruff check .
uv run --extra dev mypy
uv run --extra dev pytest

Never paste secrets into reports.

Do not paste webhook secrets, bearer tokens, raw message bodies, or provider signing secrets into issue reports, public docs, or receipts.

What's next