Covendocs

Forward input to a live session

Forward raw input to a live session's PTY stdin.

1 min read

POST
/sessions/{id}/input

Path Parameters

id*string

The session id (stable across daemon restarts).

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

data*string

Raw input bytes (UTF-8) to forward to the harness PTY. Include trailing newlines explicitly.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/sessions/session-1/input" \  -H "Content-Type: application/json" \  -d '{    "data": "continue with the next failing test\\n"  }'
{
  "ok": true,
  "accepted": true
}
{
  "error": {
    "code": "session_not_found",
    "message": "Session was not found.",
    "details": {
      "sessionId": "session-1"
    }
  }
}
{
  "error": {
    "code": "session_not_live",
    "message": "Session is not live.",
    "details": {
      "sessionId": "session-1",
      "status": "completed"
    }
  }
}
{
  "error": {
    "code": "internal_error",
    "message": "Unexpected internal daemon error.",
    "details": {}
  }
}
Was this page helpful?No