> ## Documentation Index
> Fetch the complete documentation index at: https://docs.automate.ax/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# Delegate issue

> Delegate a Linear issue to a coding-session agent such as Codex.

`delegateLinearIssue` delegates an existing issue to a Linear agent app. Linear then starts and tracks the provider's coding session on that issue.

```ts automations/delegate-linear-issue.automation.ts theme={null}
import { automation } from "automate.ax"
import {
  delegateLinearIssue,
  listLinearUsers,
  onLinearIssueCreated,
} from "automate.ax/linear"

export default automation("Delegate Linear issues to Codex", () => {
  const issue = onLinearIssueCreated()
  const agents = listLinearUsers({ app: true, active: true, name: "Codex" })

  delegateLinearIssue({
    issueId: issue.identifier,
    delegateId: agents.users[0]!.id,
  })
})
```

`issueId` accepts a UUID or human-readable identifier such as `ENG-123`. `delegateId` is the app-user ID returned by `listLinearUsers`; choose an active app user whose `supportsAgentSessions` field is `true`. Optional second argument `{ account }` defaults to the project binding.

Returns the updated `LinearIssue`, including its `delegate`. The selected agent integration must already be installed and configured in the Linear workspace. Use `updateLinearIssue({ issueId, delegateId: null })` to remove delegation.
