# CoworkRoutineRun

One run in `cowork.routines.runs` — metadata only, never the routine's output.

## Properties

### app?

```ts
app?: string;
```

The package that owns the routine's code (its manifest name); absent for a loose routine.

***

### chain?

```ts
chain?: string[];
```

The routines that called this run, outermost first; absent for a run nobody called.

***

### durationMs

```ts
durationMs: number;
```

***

### error?

```ts
error?: string;
```

***

### kind?

```ts
kind?: "app" | "capability";
```

That package's kind, when the record says.

***

### ok

```ts
ok: boolean;
```

***

### principal?

```ts
principal?: 
  | {
  kind: "owner";
}
  | {
  id: string;
  kind: "agent";
  name: string;
};
```

Who ran it: the owner (a person, a pane, a schedule) or an agent signed in with its own login.

***

### resultPreview?

```ts
resultPreview?: string;
```

***

### routineId

```ts
routineId: string;
```

***

### runId?

```ts
runId?: string;
```

***

### source?

```ts
source?: string;
```

What started it — the coding agent or the source (`claude-code`, `cli`, `app`, …).

***

### task?

```ts
task?: object;
```

A task's own record (an agent starting or finishing one): its title and goal, or its outcome.

#### goal?

```ts
goal?: string;
```

#### outcome?

```ts
outcome?: string;
```

#### parent?

```ts
parent?: string;
```

#### title?

```ts
title?: string;
```

***

### taskId?

```ts
taskId?: string;
```

The agent's task the run was made for.

***

### ts

```ts
ts: number;
```
