---
title: "codes.task-start-request@1 · OpenVibe.Services"
canonical: "https://openvibe.services/docs/contracts/codes.task-start-request"
updated: null
---

# codes.task-start-request@1 · OpenVibe.Services

HTML: [codes.task-start-request@1 · OpenVibe.Services](https://openvibe.services/docs/contracts/codes.task-start-request)

# CodesTaskStartRequest `codes.task-start-request@1`

Generated at 2026-12-01 05:42:00 UTC from [`openvibe-contracts v0.454.0`](https://github.com/OpenVibers/OpenVibe.Contracts/tree/v0.454.0) and [`openvibe-sdk v0.193.0`](https://github.com/OpenVibers/OpenVibe.SDK/tree/v0.193.0).

- Version: 1.2.0
- Owner: codes
- Visibility: first-party
- Status: active
- Compatibility: backward
- Schema: [`https://openvibe.network/contracts/codes/task-start-request.v1.json`](/docs/contracts/codes.task-start-request.json)

codes.task-start-request@1: the body of POST /api/v1/tasks on OpenVibe.Codes (capability codes.task.start). A first-party service (OpenVibe.Actor) starts a coding task for a person, named with X-OV-Subject: Codes runs it on that person's own machine through OpenVibe.Run (openvibe.codes/run, plan T16), in the project of their latest task there, so the person has used openvibe.codes/run once before a service can start one for them (else 409 codes.no\_project). REPO is an https git URL with no credentials; REF a branch or tag to start from (default: the repository's default branch). PROMPT is the task. AGENT names one of Codes' agents (GET /harnesses), absent for Codes' router to pick. PERMISSION: review (read-only: research, audits, reviews; nothing is changed), edit (default; the agents edit files) or full (they may also run commands: tests, installs). PUSH asks for the change on a new branch (GitHub, with the machine's GITHUB\_TOKEN; never the branch it started from), PULL\_REQUEST also opens a pull request. IDEMPOTENCY\_KEY: a repeat for the same person with the same key answers the first task (200, created false).

## Fields

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| `repo` | string | yes |  | - `pattern ^https://[^\s@/]+/[^\s@]+$`<br>- `format uri`<br>- `maxLength 300` |
| `ref` | string |  |  | - `pattern ^[^\s~^:?*\[\\]+$`<br>- `minLength 1`<br>- `maxLength 200` |
| `prompt` | string | yes |  | - `minLength 1`<br>- `maxLength 8000` |
| `agent` | string |  |  | - `pattern ^[a-z][a-z0-9-]{1,40}$` |
| `permission` | enum |  |  | - `one of "review", "edit", "full"` |
| `goal` | [agent.goal](/docs/contracts/agent.goal) |  |  |  |
| `plan` | [codes.model-plan](/docs/contracts/codes.model-plan) |  |  |  |
| `preset` | enum |  |  | - `one of "Fast", "Balanced", "Deep", "Council"` |
| `push` | boolean |  |  |  |
| `pull_request` | boolean |  |  |  |
| `idempotency_key` | string |  |  | - `pattern ^[A-Za-z0-9_.:-]+$`<br>- `minLength 8`<br>- `maxLength 128` |
| `actor_task_id` | string |  | The OpenVibe.Actor task id when this coding task was started from Actor. | - `minLength 1`<br>- `maxLength 256` |
| `actor_step_id` | string |  | The OpenVibe.Actor step id when this coding task was started from Actor. | - `minLength 1`<br>- `maxLength 256` |

## Examples

From the contract's own test fixtures: valid ones validate, rejected ones must fail.

 Valid: full

~~~~
{
  "repo": "https://github.com/octocat/Hello-World",
  "ref": "master",
  "prompt": "Fix the failing test and run the suite.",
  "agent": "deepseek",
  "permission": "full",
  "push": true,
  "pull_request": true,
  "idempotency_key": "act_01M4XF00000000000000000000:step-2"
}
~~~~

Valid: minimal

~~~~
{
  "repo": "https://github.com/octocat/Hello-World",
  "prompt": "Add a line to the README."
}
~~~~

Rejected: blank-prompt

~~~~
{
  "repo": "https://github.com/octocat/Hello-World",
  "prompt": ""
}
~~~~

Rejected: credentials-in-url

~~~~
{
  "repo": "https://user:token@github.com/octocat/Hello-World",
  "prompt": "x"
}
~~~~

Rejected: not-https

~~~~
{
  "repo": "git@github.com:octocat/Hello-World.git",
  "prompt": "x"
}
~~~~

Rejected: project-not-here

~~~~
{
  "repo": "https://github.com/octocat/Hello-World",
  "prompt": "x",
  "project": "prj_01M4XE52PGJDVR1KZ1AG9VYW3Q"
}
~~~~

Rejected: unknown-permission

~~~~
{
  "repo": "https://github.com/octocat/Hello-World",
  "prompt": "x",
  "permission": "root"
}
~~~~

## Validate

~~~~
const contracts = require('openvibe-contracts');
contracts.validate('codes.task-start-request@1', value);   // { valid, errors: [{ path, message }] }
~~~~
