# Claude Code

In Claude Code, the Clanker Ship plugin names each session after its ticket, draws the ticket above the prompt with a pane for its checklist and your other work, and starts a turn with each new message.

The Clanker Ship plugin for Claude Code keeps each session's ticket in view. It works the same in
the terminal and in the Claude desktop app's Code tab.

| Where              | What it shows                                                                         | How                              |
| ------------------ | ------------------------------------------------------------------------------------- | -------------------------------- |
| The session's name | `WEB-31: Add docs search`, at most 36 characters                                      | The prompt hook's `sessionTitle` |
| Above the prompt   | The ticket, linked to its page, its status and its checklist's progress               | The plugin's mod                 |
| The pane           | The ticket's checklist, Human items first, its documents, and your other open tickets | `/ticket` or `/work`             |

## The session's ticket

Each session works on one ticket: the one you picked, else the one its clanker created or linked in
the session, else the one its branch is linked to, else the one its branch's name carries. See
[Sessions and their tickets](https://docs.clankership.com/get-started/concepts/clankers-and-messages.md#sessions-and-their-tickets).

- The plugin's tool hook runs after each `create_ticket` and `link_ticket_branch` call, so the ticket
  the clanker creates or links becomes the session's.
- `clanker ticket create` and `clanker ticket branch link` do the same when Claude Code runs them, as
  they read the session from `CLAUDE_CODE_SESSION_ID`.
- `/ticket WEB-31` picks a ticket for the session. So do **Work on it here** in the pane, **Change**
  on My clankers, [set_session_ticket](https://docs.clankership.com/mcp/tools/set_session_ticket.md) and `clanker session ticket`.

The session is named after its ticket once it has one, and again after every ticket call, replacing
a name you typed. The terminal's tab and the resume list follow the name. The desktop app's sidebar
keeps a name you typed there.

## The band and the pane

The band leads with the ticket's ID and its title. At the right are its status and a bar of its
checklist's progress, done in green and in progress in a lighter green, and 🙋‍♂️ when this ticket or
another of yours needs you. In the desktop app the ID opens the ticket, and 🙋‍♂️ opens My clankers,
in the app's browser pane beside the chat; cmd or ctrl click opens either in your browser. Click the
status to open the checklist under the band, then click an item to move it from not started to in
progress to done, with your own Clanker Ship sign-in. The band's **×** hides it until the session's
ticket changes, or until `/ticket`.

Without a ticket, the band is one row that offers **Pick a ticket** and **File one for this**,
which puts "File a ticket for this work" in the prompt. **Pick a ticket** lists your open tickets in
the band, grouped by status; click one to make it the session's ticket. A long list scrolls.

`/ticket` and `/work` open the pane. The pane lists the ticket's Human items under **For you**;
**Check** checks one with your own Clanker Ship sign-in, so it counts as yours, as on the website.
Clanker items are read-only there. **My work** lists your open tickets, the ones that need you
first, with the other live sessions working on each.

## Staying live, and messages

The mod runs `clanker session connect` for the life of the session. It asks
`/clanker/v1/sessions:connect` for a token good for a minute and opens the session's WebSocket at
`/clanker/v1/live`. While it is open, the session is live on My clankers, and changes to its ticket
or your work redraw the band within about a second. When it closes, the session stays live for a
minute.

A message routed to the session arrives over the connection, and the mod starts a turn with it,
once the session is idle. See [Routing](https://docs.clankership.com/get-started/concepts/clankers-and-messages.md#routing).

## Without the mod

Under `claude -p`, or where an administrator blocks mods, nothing connects. The hooks still name the
session, give the clanker its ticket line at each prompt and hand over messages at each prompt and
stop, so the session is live around its hooks and an idle session isn't woken.
