This document is the authoritative IPC contract reference for idx0 as implemented by:
idx0/App/IPCServer.swiftidx0/App/IPCCommandRouter.swiftSources/IPCShared/IPCContract.swiftSources/idx0/idx0.swift(CLI client)
- Socket type: Unix domain socket (
AF_UNIX,SOCK_STREAM) - Path:
~/Library/Application Support/idx0/run/idx0.sock - Permissions:
0600(owner only) - Request model: one JSON request per connection
- Response model: one JSON response, then close
Request:
{
"command": "commandName",
"payload": {
"key": "value"
}
}Response:
{
"success": true,
"message": "Human-readable status",
"data": {
"key": "value"
}
}Notes:
- Payload values are strings.
- Boolean-like payload fields are parsed from strings (
1,true,yes,yfor true). - Some responses return JSON arrays encoded as a string in
data["json"].
Commands accepting a session field resolve in this order:
- Exact UUID match
- Case-insensitive exact title match
- Case-insensitive title substring match (must resolve to exactly one session)
If no or multiple matches are found, command fails.
Canonical command constants from IPCCommand.all:
opennewSessionnewSessionWithToolfocusSessionlistSessionscreateCheckpointcreateHandoffrequestReviewlistQueuelistApprovalsrespondApprovallistVibeToolsagentEventsetReviewStatusmarkQueueResolvednotify
Purpose: Activate/foreground the app.
Payload: none
Success message: idx0 activated
Purpose: Request session creation.
Payload fields:
title(optional)repoPath(optional)branchName(optional)createWorktree(optional bool string)existingWorktreePath(optional)toolID(optional, explicitly launched after create)
Response is immediate (Session creation requested); session creation is async.
Purpose: Request session creation and optional default-tool fallback launch.
Payload: same as newSession
Behavior:
- if
toolIDprovided, that tool is launched - otherwise default configured tool may auto-launch
Payload:
session(required, UUID or title query)
Errors:
- missing session
- no match
- ambiguous match
Payload: none
Data payload:
- map of
sessionUUID -> sessionTitle
Payload:
session(required)title(optional, defaultCheckpoint)summary(optional, defaultManual checkpoint)requestReview(optional bool string)
Response is immediate (Checkpoint requested); creation is async.
Payload:
session(required source)targetSession(optional)checkpointID(optional UUID)title(optional, defaultHandoff)summary(optional, defaultHandoff requested)risks(optional comma-separated list)nextActions(optional comma-separated list)
Payload:
session(required source)checkpointID(optional UUID)summary(optional, defaultReview requested)
Payload: none
Data payload:
data["json"]is a JSON array of unresolvedSupervisionQueueItemvalues
Payload:
session(optional filter)status(optional filter:pending|approved|denied|deferred)
Data payload:
data["json"]is filtered approvals, sorted pending-first then newest-first
Payload:
approvalID(required UUID)status(required:approved|denied|deferred)
Payload: none
Data payload:
data["json"]array ofVibeCLITool
Payload:
envelope(required JSON string)
Router behavior:
- decode envelope
- validate schema
- dedupe by
eventID - resolve target session
- ingest into workflow queue/timeline/checkpoint/review/handoff/approval flows
Payload:
reviewID(required UUID)status(required:approved|changesRequested|deferred)
Payload:
queueID(required UUID)
Purpose: create queue/timeline notification and optional session activity transition.
Payload:
sessionID(required UUID)title(optional, defaultActivity)summary(optional)category(optional, defaults toinformational)- supported values: queue categories (
approvalNeeded,reviewRequested,blocked,completed,error,informational)
- supported values: queue categories (
activity(optional:active|waiting|completed|error|clear)activityDescription(optional)
Notes:
- Activity updates are applied only when payload appears agentic (except
clear, which is always honored).
Schema version: 1
Shape:
{
"schemaVersion": 1,
"eventID": "UUID",
"sessionID": "UUID or null",
"sessionTitleHint": "string or null",
"timestamp": "ISO8601",
"eventType": "progress|checkpoint|handoff|reviewRequest|approvalRequest|completed|blocked|error",
"payload": {}
}Supported eventType values map to AgentEventType:
progresscheckpointhandoffreviewRequestapprovalRequestcompletedblockederror
Error semantics:
- unsupported schema -> failure
- duplicate event ID -> failure (
Duplicate event ignored.) - unresolved session -> failure
- malformed envelope JSON -> decode failure
Dedup state is persisted in agent-events.json.
CLI executable (Sources/idx0/idx0.swift) maps to IPC commands:
idx0 open->openidx0 new-session ...->newSession/newSessionWithToolidx0 checkpoint ...->createCheckpointidx0 handoff ...->createHandoffidx0 request-review ...->requestReviewidx0 focus ...->focusSessionidx0 queue->listQueueidx0 list-approvals ...->listApprovalsidx0 respond-approval ...->respondApprovalidx0 list-vibe-tools->listVibeToolsidx0 list-sessions->listSessions
echo '{"command":"listSessions","payload":{}}' \
| socat - UNIX-CONNECT:"$HOME/Library/Application Support/idx0/run/idx0.sock"echo '{
"command":"newSession",
"payload":{
"repoPath":"/Users/me/project",
"createWorktree":"true",
"branchName":"idx0/feature-branch"
}
}' | socat - UNIX-CONNECT:"$HOME/Library/Application Support/idx0/run/idx0.sock"echo '{
"command":"agentEvent",
"payload":{
"envelope":"{\"schemaVersion\":1,\"eventID\":\"0F2F66F2-7C4D-4A96-9C4A-A5F9B4DBA89E\",\"sessionID\":\"11111111-1111-1111-1111-111111111111\",\"sessionTitleHint\":null,\"timestamp\":\"2026-03-22T15:00:00Z\",\"eventType\":\"progress\",\"payload\":{\"summary\":\"running tests\"}}"
}
}' | socat - UNIX-CONNECT:"$HOME/Library/Application Support/idx0/run/idx0.sock"When modifying IPC behavior:
- keep existing command names stable unless a versioned migration is planned
- keep payload parsing tolerant for optional fields
- update
IPCCommand.all, router handling, CLI mapping, and this doc in one change