Skip to content

Claims and work

Hand an issue you claimed off: your claim ends as handed_off, with note saying where the work stands, for to (a username) or, without one, for anyone.

POST/repos/{owner}/{name}/issues/{number}/handoff

A work.handoff_requested event, which whoever follows the issue hears; the next claim on it says it took the hand-off over. Refused with 404 when you hold no active claim on it.

  • Authentication: Required. Send an access token as Authorization: Bearer.
  • MCP tool: issue with action handoff, and the same inputs
  • Scope: An access token needs issues:write.
Name Type Required Description
owner string Yes The workspace that owns the repository.
name string Yes The repository’s name.
number integer Yes The issue’s number.

Send a JSON object. Names are snake_case, as in responses; the camelCase spelling is accepted too.

Name Type Required Description
to string No The username it is for. Left out, it is for anyone.
note string Yes Where the work stands: what is done, what is left, what to watch for. Up to 500 characters.
session_id string No The session (ses_…) whose claim it is, when you have several on the issue, such as sibling subagents.
curl -X POST https://api.g1t.sh/repos/flagon-io/hello/issues/12/handoff \
-H "Authorization: Bearer $G1T_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"to": "ana",
"note": "Parsing is done and tested; the README still needs the new usage."
}'

A successful request answers 200 with:

{
"id": "clm_01m4b3d5f7h9k1m3p5r7t9w1y3",
"repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
"issue": 12,
"session_id": "ses_01m4b2c3d4e5f6g7h8j9k0m1n2",
"actor": {
"id": "usr_01kkntcg1eeb98j62xjm7eh09p",
"username": "syntaqx"
},
"harness": "claude_code",
"note": "Parsing is done and tested; the README still needs the new usage.",
"state": "handed_off",
"created_at": "2026-10-12T14:03:02.771Z",
"expires_at": "2026-10-12T15:01:40.518Z",
"ended_at": "2026-10-12T14:38:00.000Z",
"end_reason": "handed_off",
"handoff_to": "ana"
}

A failed request answers with one of these statuses and a body like {"error": {"code": "not_found", "message": "Repository not found."}}. See errors.

Status Code When
401 unauthenticated A token is required, or the one sent is not valid.
403 forbidden The token is valid but not allowed to do this, such as a member-only change, or a token without the scope it needs.
404 not_found It does not exist, or you cannot see it.
409 conflict The request conflicts with the current state.
422 invalid The input is not valid. message says which field and why.