---
title: "Tickets and pull requests"
description: "Start Kai Code from a ticket, follow the session from the inbox, and hand tickets to your own coding app."
url: https://docs.gleap.ai/en/articles/691-tickets-and-pull-requests
collection: "Kai Code"
updated: 2026-11-01
language: en
---

# Tickets and pull requests

Start Kai Code from a ticket, follow the session from the inbox, and hand tickets to your own coding app.

Kai Code is built to work from the inbox. Every bug report, feature request and inquiry carries a **Kai Code** card in its sidebar: "Kai picks up this ticket, fixes it, and reports back."

## Fix with Kai Code

Choose **Fix with Kai Code** on the card. The Kai Code composer opens over the ticket with the headline **"Let Kai Code handle #1234!"** and the ticket already attached: its description, conversation, reporter details, screenshots, replay and console logs are Kai's context. The repository chip starts as **Repos: Auto**: Kai picks the right repositories from the ticket when you send; add one to choose yourself.

Add any instructions and send. The session runs like any other: Kai plans, asks when it needs a decision, changes code and opens a pull request. Sessions started from a ticket are visible to the whole team.

Only one session can run per ticket at a time. While one is active the card shows **Open running session** instead.

## Following along

Below the composer the card lists every session linked to the ticket with its state, when it last changed, and a **Preview** link when a preview is running. Open a session to read the transcript or steer it. Inside a session, **Ticket** (**T**) jumps back to the ticket.

## Hand over to your coding app

The chevron next to **Fix with Kai Code** offers the same task in your own tool: **Open in Claude Code**, **Open in Codex** or **Open in Cursor**. Gleap opens the app with the ticket, the project and its repository; status, the agent's plan, screenshots and pull requests sync back to the ticket's coding session through the Gleap MCP server. Your last choice becomes the button's default. Setup, the session tools and the Gleap plugin for Claude Code and Codex are on [Your own coding agent](https://gleap-developer-docs.gleap.help/en/articles/692-your-own-coding-agent).

If the app has not reported back 5 minutes after the hand-off, the ticket says it hasn't connected to Gleap yet and shows the one-line command that adds the Gleap MCP server to it. A report that arrives after a session closed for 24 hours of silence reopens that session.

### Investigate instead of fixing

**Investigate in Claude Code**, **Investigate in Codex** and **Investigate in Cursor** hand over a support investigation: the app reads the ticket, looks into the code and your data, and drafts the reply in the ticket composer for you to review and send. It changes no code and opens no pull request; the session finishes as **Answer drafted**.

### Your own actions

A project can add its own actions to the same menu (AI agents → Kai Code → Settings): a name, the app, and a prompt that Gleap fills from the ticket with `{{ticket.number}}`, `{{ticket.id}}`, `{{ticket.title}}`, `{{contact.email}}`, `{{repo}}`, `{{project.name}}`, `{{session.id}}` and `{{mcp.url}}`. They also appear in the **Build** menu on feature requests. Each click creates the tracked session first, so progress, pull requests and customer messages sync back like the built-in actions.

### Reporting from your own tools

An app that Gleap did not open (your own sidebar app, a saved prompt, a script) can report too. The Gleap MCP `report_progress` tool takes a `ticketId` (the 24-character id or the `#number`) when there is no `sessionId`: Gleap continues the ticket's open session from the app or starts one for the signed-in user, and the result names the session id for the next calls. The ticket must belong to the project the MCP connection is signed in to.

<table style="min-width: 75px;"><colgroup><col style="min-width: 25px;"><col style="min-width: 25px;"><col style="min-width: 25px;"></colgroup><tbody><tr><th colspan="1" rowspan="1"><p>Field</p></th><th colspan="1" rowspan="1"><p>Required</p></th><th colspan="1" rowspan="1"><p>Notes</p></th></tr><tr><td colspan="1" rowspan="1"><p><code>sessionId</code></p></td><td colspan="1" rowspan="1"><p>one of the two</p></td><td colspan="1" rowspan="1"><p>From a Gleap kickoff prompt ("tracked as Gleap coding session …").</p></td></tr><tr><td colspan="1" rowspan="1"><p><code>ticketId</code></p></td><td colspan="1" rowspan="1"><p>one of the two</p></td><td colspan="1" rowspan="1"><p>When the prompt names no session. Ignored when <code>sessionId</code> is set.</p></td></tr><tr><td colspan="1" rowspan="1"><p><code>phase</code></p></td><td colspan="1" rowspan="1"><p>yes</p></td><td colspan="1" rowspan="1"><p><code>investigating</code>, <code>reproduced</code>, <code>fixing</code>, <code>pr_opened</code>, <code>blocked</code> or <code>done</code>. <code>blocked</code> means waiting on you: the session shows as waiting with the agent's question and does not expire.</p></td></tr><tr><td colspan="1" rowspan="1"><p><code>message</code></p></td><td colspan="1" rowspan="1"><p>yes</p></td><td colspan="1" rowspan="1"><p>One line, up to 2000 characters.</p></td></tr><tr><td colspan="1" rowspan="1"><p><code>prUrl</code></p></td><td colspan="1" rowspan="1"><p>with <code>pr_opened</code></p></td><td colspan="1" rowspan="1"><p>Registers the pull request so merge follow-up and customer messages run.</p></td></tr></tbody></table>

The result also carries `stop` (`true` once the session was stopped in Gleap) and `hook`, the session file for the [Gleap plugin's hooks](https://gleap-developer-docs.gleap.help/en/articles/692-your-own-coding-agent#what-report_progress-returns).

## From Kai Support's investigation

When Kai Support investigates a ticket and concludes that code needs to change, its card carries the same **Fix with Kai Code** button. It opens a new session with the investigation as the prompt and the suggested repositories attached. Kai Support steps back once the coding session starts.

## After the pull request

You review and merge in GitHub, Azure DevOps, GitLab or Bitbucket as usual. On merge, Gleap follows your [Customer replies](https://gleap-developer-docs.gleap.help/en/articles/696-customer-replies) setting: a teammate verifies the fix is live and Kai drafts the reply, Kai replies automatically after the deployment delay, or nothing is sent.

If the customer later reports that the fix needs more work, the Kai Code card shows their feedback with **Continue coding session**. One click reopens the session with the feedback inserted.

## Requirements

-   The **Kai Code** plan feature; without it the card offers **Start Kai Code** with an upgrade.
    
-   The **Kai Code cloud** permission for cloud sessions, granted through roles.
    
-   At least one connected [repository](https://gleap-developer-docs.gleap.help/en/articles/693-repositories) or [linked platform app](https://gleap-developer-docs.gleap.help/en/articles/694-lovable-replit-v0-and-base44) in the project.

## Related

- [Kai Code](https://docs.gleap.ai/en/articles/688-kai-code.md)
- [Getting started](https://docs.gleap.ai/en/articles/689-getting-started.md)
- [Sessions](https://docs.gleap.ai/en/articles/690-sessions.md)
- [Your own coding agent](https://docs.gleap.ai/en/articles/692-your-own-coding-agent.md)
- [Repositories](https://docs.gleap.ai/en/articles/693-repositories.md)
