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

# Tasks

> A task is a coding session running in its own cloud environment, the unit of work in Niteshift.

A task is a coding session running in its own isolated cloud environment. When you start one,
Niteshift clones your repository, runs your
[Niteshift setup script](/environment-configuration/setup-script), boots your dev server, and hands
control to the agent inside the environment.

## Where tasks come from

* The web UI at [niteshift.dev](https://niteshift.dev)
* A [GitHub](/interfaces/github) PR with `/niteshift <prompt>`
* [Slack](/interfaces/slack), by mentioning `@Niteshift`
* A [Linear](/interfaces/linear) issue assigned to Niteshift
* An [automation](/automations) triggered by a webhook or schedule

## Workspace

Every task opens with a chat panel on the right and four tabs on the left.

* **Chat**: talk to the agent. Markdown supported. Paste, drag, or upload screenshots, logs, and
  reference docs. Drafts persist locally per task.
* **Preview**: live iframe of your dev server.
* **Git**: pull request summary, CI checks, commits, and every changed file. Queue inline comments
  on a range of lines. The agent picks them up like review feedback in its next response.
* **Terminal**: direct shell into the cloud environment.
* **Logs**: real-time stdout and stderr from every process, with search.

## Lifecycle

Tasks suspend after inactivity and resume on demand when you reopen or prompt them. The filesystem
and chat history persist across suspend/resume; long-running processes (your dev server, watchers)
restart on resume.

## Visibility

Tasks are visible to everyone in your organization. Anyone in the org can open the task and watch it
work; only the owner can send prompts.

## Commit and pull request

When the agent finishes, a stop hook asks it to commit and push. Niteshift opens a pull request that
respects your repository's PR preference configured on the
[settings page](https://niteshift.dev/settings) (defaults to draft).
