---
title: "Writing code"
description: "Hand Indent a coding task and it goes from prompt to pull request, then keeps working through review and CI."
---

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

# Writing code

Indent explores the codebase, plans the change, edits the code, runs linters and tests, and opens a
pull request. You watch each step as it happens: which files it read, what it edited, and what
commands it ran. Click an edit to open its diff beside the transcript.

![A session with the transcript on the left and an edit's diff open in the side panel](/images/session-diff-panel.png)

## From prompt to pull request

Describe a bug, feature, or task in a session. Indent reads files, searches for references, and runs
commands to understand the codebase, then makes the change, verifies it, and opens a pull request.

For example:

> @indent The `/export` endpoint times out on large accounts. Paginate it, and add a test that
> covers an account with 10k+ records.

Indent runs in a fresh sandbox with your repository cloned, plus a shell and a browser. It has your
code but not your build — dependencies aren't installed and services aren't running. Some tasks need
your application built and running: the full test suite, a live service, or the UI in a browser. For
those, start the session in an [environment](/getting-started/environments) you've configured, where
everything is ready from the first message.

> **Note**
>
> Connect a repository from [**Settings → GitHub
> repositories**](https://app.indent.com/settings/github-repositories) before you start. See
> [Connecting GitHub](/connecting/github).

## Iterate in the session and on the pull request

The session stays connected to the pull request it opens, so you can keep working on the change:

- **Review comments** — a teammate's comment on the pull request routes back to the session. Reply
  directly in an inline thread and Indent responds without a mention; in a top-level comment,
  mention `@indent`.
- **CI failures** — a failing check comes back to the session, where Indent reads the logs, decides
  whether the failure relates to the change, and pushes a fix.
- **Your follow-ups** — a message in the session refines the approach or redirects the work. If the
  session has suspended, a new message resumes it.

## What Indent can build

- **Bug fixes** — Indent reproduces the issue, traces the root cause, fixes it, and verifies.
- **Features** — Indent scaffolds new functionality, wires it into existing code, and runs tests.
- **Infrastructure and configuration** — Indent edits CI pipelines, Dockerfiles, and deployment
  configs.
- **Assets and non-code files** — Indent edits SVGs, config files, migration scripts, and anything
  else in the repository.

## Give Indent more to work with

The more Indent knows about your codebase, the better its changes fit:

- [AGENTS.md](/learning/agents-md) — repository facts loaded at the start of every session: setup,
  architecture, conventions, testing, and deployment.
- [Skills](/learning/skills) — reusable workflows Indent pulls in when a task matches.
- [Connected databases](/connecting/databases) — schema and data Indent can query while it works.

For more on framing tasks well, see
[Getting good results from Indent](/working-with-indent/getting-good-results).

Source: https://docs.indent.com/working-with-indent/writing-code/index.mdx
