Agent-readable docs index: /llms.txt. Full docs in one file: /llms-full.txt. Download /docs.zip to grep all markdown files locally.

Report and investigate issues

Agents report trace events. Halfspan automatically groups supported adverse events into the dashboard's Issues page; there is no separate issue-creation request. A tool call or a message saying that something failed does not by itself create an issue.

Send a failure from your runtime

Install @halfspan/sdk and create a workspace API key with traces:write. Set HALFSPAN_API_KEY in your server environment, then call the hook when your tool reports a failure:
bun add @halfspan/sdk
import { createAgentTraceHook } from '@halfspan/sdk'; const onTrace = createAgentTraceHook({ apiUrl: 'https://app.halfspan.com', ingestToken: process.env.HALFSPAN_API_KEY!, }); const session = crypto.randomUUID(); // Keep this UUID for the whole run. const failure = { session, segment: 'coding' as const, task: 'verify-change', attempt: '1', id: crypto.randomUUID(), at: new Date(), kind: 'tool_receipt' as const, operation: 'required_checks', reference: 'verification-run-1', state: 'failed' as const, }; await onTrace(failure);
The hook posts to POST /v1/agent-events. After ingestion, this event appears as a Tool failure: required_checks issue. Reuse the original event ID, timestamp, and payload when retrying an upload; assign a new event ID to a new occurrence. Replaying an identical event does not add another occurrence.
Use a stable operation name such as required_checks for the kind of work and a call-specific reference for its execution. Keep credentials and confidential content out of both fields. See the event ingestion guide for batch limits and the wire format.
If your runtime writes event batches as NDJSON, you can instead forward them using your saved CLI login:
span login bun run agent.ts | span hook ingest
Use agentTraceBatch(event) to produce each line, as shown in Agent services and signals. Keep other application output on stderr.

Events that create issues

Recorded eventRequired conditionIssue category
tool_receiptstate: 'failed'Tool failure
resumefailed: trueFailed resume
outcomeresult: 'failed'Failed outcome
retryEvery recorded retryRepeated attempt
application_logseverity: 'error'Application error
user_feedbackvalue: 'negative'Negative feedback
The SDK uses camelCase for fields such as previousAttempt and targetEventId; JSON batches use previous_attempt and target_event_id. The SDK examples and event contracts cover required fields for each event.

Share failures from coding agents

For an existing local transcript, sign in and share the session:
span login span share --list --json span share --session <SESSION_UUID>
For supported lifecycle integrations, install agent hooks to upload automatically. Claude Code setup uses span setup hooks --agent claude-code. Sharing uploads the events the adapter can extract; it does not guarantee that every error in a transcript becomes a structured failure.
The Claude-style importer converts tool results marked is_error: true into failed tool receipts. The Codex transcript importer currently records tool calls but does not convert their outputs into failure receipts. A failed command in a shared Codex transcript therefore does not automatically create a tool-failure issue. Send a structured failure from your runtime or CI through the SDK or ingestion endpoint when you need that signal. Enabling prompt, reply, or summary capture does not fill this gap.

How occurrences are grouped

Within a workspace, an issue groups events with the same segment, category, target, project, and environment. The target is the tool receipt's operation, the application log's code, or the negative feedback's dimension; other categories have no target. Different sessions can contribute occurrences to the same issue.
Version 2 swarm batches provide project and environment. Events without that context appear under unassigned and unspecified. See swarm envelopes to attach those fields.
Open Issues to select a time range and filter by status, severity, project, or environment. Counts and trends reflect the selected window, using server-recorded event times. Open an issue to inspect its evidence and source traces. Unsharing, deletion, and session expiry remove the affected evidence from the issue view.

Review severity and status

Issue creation does not require a classifier. Severity starts as Unclassified. When classification is configured and you have review permission, select Classify severity on the issue detail page. Use Reclassify severity to assess updated evidence.
The classifier suggests critical, high, medium, or low severity from recorded evidence. A failed tool or a high occurrence count alone does not establish impact. Insufficient evidence can leave an issue unclassified, and an unavailable classifier does not prevent occurrences from appearing. The detail page shows the model, assessment time, evidence coverage, and assessment window so you can review the suggestion against the original events. Classification uses a bounded evidence sample, not necessarily every occurrence.
Resolve an issue after reviewing it, or reopen it when further work is needed. Status is a review decision; a successful later event does not automatically resolve the issue.

Send incident notifications

A workspace administrator can open Settings → Notifications to connect Slack incoming webhooks, a Telegram bot and chat, email through Resend, or SMS through Twilio. Add a destination for each recipient or channel. Credentials are encrypted in PostgreSQL and are never returned to the dashboard.
For self-hosted installations, generate a persistent 32-byte key with openssl rand -base64 32. Set HALFSPAN_NOTIFICATION_KEY to the same value on the API and halfspan-api monitor-worker replicas so each can decrypt saved destinations. Run the telemetry migrations and apply the runtime grants in infra/observability/local-role.sql or the hosted role script.
Each destination can filter project, environment, and one of the event categories above. Empty filters match all values. Set the minimum occurrence count and time window to notify on an isolated failure or a burst of retries. Detection uses recorded events within the current server time window. Adding a destination does not send historical alerts; a newly ingested event must match the rule.
Matching events create a triggered incident and queue a notification for each matching destination. Further matching events remain grouped under that incident. Acknowledge an incident to record ownership and suppress newly queued notifications; deliveries already queued continue retrying. Resolve it to cancel pending deliveries. A new matching event after resolution reopens the incident and can notify again. Incident status is managed separately from the Issues page's review status.
Disabled destinations pause pending deliveries. Transient provider failures retry up to five attempts with increasing delays; permanent failures are visible immediately. Email and SMS delivery success means the provider accepted the request, rather than confirmation that a person received or read it. Delivery is at least once: providers without idempotency support can receive duplicates after a timeout or process restart. A request already in flight can finish after a destination is disabled or an incident is resolved.
In Monitoring → Monitors, select a metric and time window to see past measurements. Fixed thresholds compare the current value against the limit you enter. Anomaly monitors compare it with the median and median absolute deviation from the same UTC window on the previous seven days. They require four qualifying baseline windows and the configured minimum number of current samples. You can acknowledge a triggered monitor or mute it during maintenance.
In Signals → Signal builder, save a draft and test it on up to 20 retained traces before enabling it. Deterministic rules run locally. Semantic definitions use the signal worker's configured OpenRouter model. Set OPENROUTER_API_KEY and HALFSPAN_SIGNAL_MODEL on halfspan-api signal-worker. Each workspace has a per-minute call limit, daily evaluation budgets and optional overrides for daily token and spend reservations through HALFSPAN_SIGNAL_DAILY_TOKENS and HALFSPAN_SIGNAL_DAILY_USD_MICROS. The preview shows unavailable results when a provider or quota prevents evaluation.
Settings supports Slack Incoming Webhooks, Slack App OAuth, Telegram, email, SMS, webhooks, PagerDuty and Linear. To connect a Slack App, set HALFSPAN_SLACK_CLIENT_ID, HALFSPAN_SLACK_CLIENT_SECRET and HALFSPAN_SLACK_REDIRECT_URI on the API and register the matching redirect URI ending in /v1/integrations/slack/oauth/callback in your Slack app.