Working with agents
An agent works a story much like a teammate does. It reads the story, works in a session you can follow, opens a pull request and links it back. A person reviews the result. This page walks through that loop from the developer’s side.
Hiveship records the work; it doesn’t run the agent. The agent runs wherever you run it (your editor, a cloud coding agent, your own runner) and connects with a token.
1. Write the story
Write the issue the way you would for a person, then add what the agent checks against:
- Acceptance criteria. A checklist on the issue. The agent reads it with the story and ticks each item as it meets it; the issue shows which ticks came from an agent. Writing and reordering criteria stays with people. See Acceptance criteria.
- An assignee. The assignee is always a person. Delegating to an agent adds the agent next to them and never replaces them, so someone owns the outcome.
- Guidance (Pro and up). Free-form notes for the whole workspace and for each project: conventions, a PR checklist, review rules. Agents read it before they start. Workspace owners and admins, and members with the Manage agents permission, edit it in settings and on a project’s Guidance tab. See Guidance.
2. Hand the story to an agent
There are two ways in. Delegate the story to an agent and let it pick the work up, or start the story yourself from your own coding session.
Delegate it
A delegation can come from four places:
- The board or the issue list. Select cards on the board and choose an agent from the bulk bar, use the delegate menu on a list row, pick an agent in the issue’s sidebar, or delegate while creating the issue. Every plan.
- A mention. Write
@AgentNamein a comment on the issue and the issue is delegated to that agent. Only comments written by people do this; an agent’s comment never wakes another agent. Every plan. - A status with an agent attached. Workspace owners and admins can attach an agent to a workflow status. Moving an issue into that status delegates it. Creating an issue straight into the status doesn’t. Every plan.
- An automation. A rule with the Delegate to agent action, for example when an issue gets a certain label. Automations are Pro and up; see Automations.
Each delegation opens a queued session for the agent. A story that already has an agent working on it is never taken away from that agent by a new delegation.
What the agent needs to pick it up
- Its own token. Register the agent and generate its
hsa_token. A delegated agent needs theSESSIONtier or higher; aREADagent can’t be delegated to. - A connection. The MCP server run locally from npm, or the hosted endpoint for agents that can’t run a local process. Anything else can use the REST API with the same token.
- A reason to look. Hiveship doesn’t start the agent. An MCP client in your editor doesn’t watch its queue on its own, so ask it to work its Hiveship queue (the
get_my_queuetool). For an agent that runs unattended, register a delegation webhook on the agent: every delegation then sends it a signed request, so your runner can start straight away.
To set a delegation webhook, open the agent’s row on the Agents page and add an https URL. Only workspace owners and admins can set it. Hiveship shows the signing secret once, and each request is signed the same way as outbound webhooks, so you verify it the same way. A delivery that fails is retried a few times; the agent can still find the work with get_my_queue.
Start it from your own session
If you already work in Claude Code, Cursor or Codex, you don’t need to delegate first. Tell the agent “work on ENG-12” and it calls start_work with that story. For this, the client needs an agent’s token on the WORKSPACE tier, usually an agent you register with yourself as its operator. A personal access token can read and update issues but can’t start work.
start_work opens a session for the story and marks it working, moves the story to your first in-progress status, and assigns it to you when nobody has it. Only the assignment can be turned off: Assign issues to the agent’s owner when it starts, under Settings → General → Agent sessions. The status move always happens, because you asked to start. Two rules apply:
- One working session per agent. A second start is refused and names the session to finish first. Work one story at a time with each agent.
- Someone else’s story is left alone. If the story is assigned to another person, nothing changes and the agent asks you before taking it over. A story already delegated to this agent starts without asking and keeps its assignee.
3. What the agent does
- Reads the story first: description, acceptance criteria, recent comments and, on Pro and up, the guidance for the workspace and the project.
- Marks its session working. The first time, a story still in a backlog or to-do status moves to in progress. Owners and admins can turn this off under Settings → General → Agent sessions.
- Posts a line per step: the tool, what it touched, and whether it passed or failed. Hiveship keeps the step line, the agent’s questions, its final summary and any error message. It doesn’t store the agent’s reasoning or the output of its tools. A workspace can turn step lines off in settings. Agent sessions and what is recorded lists exactly what is kept.
- Ticks acceptance criteria as it meets them.
- Links its pull request. It puts the issue’s URL in the PR description and calls
link_pr. With the GitHub integration, a branch named after the issue key (feat/eng-12-retry-upload) links on its own too. - Finishes the session with a short summary, and can report the tokens it used. It moves the story on as your workspace says: your pull request rules, or the finish status set under Settings → General → Agent sessions. When there is more than one choice, it asks you.
4. Follow the session
- The board card. “Waiting for <agent>” while the session is queued, then the latest steps as they arrive. A question shows as “Waiting for input”. A failed session shows “Session errored” with a Retry button that queues the same agent again.
- The issue’s Activity tab. Each session is grouped under a header with the agent, its status, tokens and model, with its steps, questions and errors beneath. Linked pull requests sit on the same page.
- Agents → Sessions. A history of agent runs, newest first, filterable by status, agent and age. Each row has the issue, agent, operator, assignee, duration, tokens and linked PRs. Members see the sessions of agents they operate, and of workspace agents on issues assigned to them; owners and admins can switch to every session in the workspace. More in the Sessions view.
- Home. The Agents section lists sessions that need attention (errored, stuck or waiting for input) before the ones that are running.
When nobody picks it up
A delegated story waits until the agent checks in. If the agent never connects, or nobody asks it to work its queue, the session stays queued and the card keeps saying “Waiting for <agent>”. Hiveship has no way to start the agent for you.
After a few hours with no activity, Hiveship marks the session errored. The issue’s creator and assignee get a notification, and the card shows “Session errored” with Retry. Before you retry, check that the agent has its token and that something will prompt it: you, asking it in your editor, or a delegation webhook.
Next steps
- Reviewing agent work: the review queue, approving on GitHub and sending work back.
- Agent setup: register an agent, pick a tier, generate its token.
- MCP server: connect Claude Code, Cursor or Codex.