Public Beta. This content is updated as features change.
Link sessions to issues
Get a session onto an issue's history in one of three ways. Name the issue, put its number in the branch name, or pick it afterwards.
On the trace of an unlinked session, pick an issue from Link to issue, and the session appears on that issue's Sessions tab.
Sessions, Trace and Issue screens (sample data) · No sound · 8.9 s
A session appears on an issue's history once it has a confirmed link (confidence 0.8 or higher) to that issue. There are three ways to get one. Name the issue when you hand over the work, put the issue's number in the branch name, or pick the issue after the session ends. However the link is made, the session shows up on the issue screen the same way.
Name the issue when you start
Claude Code
- In Claude Code with the Harnessforce plugin installed, include the issue key in your request, for example "Fix HF-123".
- The agent checks the issue with
get_issueand registers the session for it withstart_session. If you name the issue partway through, the work before that point is included too. - If you start work that will commit changes without naming an issue, the agent offers up to five existing issues and asks once whether to pick one. If you don't, it carries on without a link. The agent never creates issues.
Registering a session needs the Member role or higher. For viewers, or while the workspace is read-only, the agent tells you why it can't link the session and keeps working.
Codex, or deciding at launch
Start the agent through harnessforce run with the issue, and the session is linked from the moment it starts.
harnessforce run --issue HF-123 -- codexIf the issue can't be found, harnessforce run doesn't start the agent.
On machines set up with your organization's managed settings
Registrations that arrive with a workspace ingest key get confidence 0.6, even when the issue was named or passed to harnessforce run --issue, so they don't become confirmed links. To get these sessions onto the history, use the branch name or pick the issue afterwards.
Put the issue number in the branch name
- Create a branch whose name includes the issue identifier, such as
hf-123-retryorgh-45-fix. - Work on that branch and open a pull request.
- The GitHub App links the pull request to the issue from the branch name, and sessions that ran on that branch are linked to the issue through the pull request. The session must have started before the pull request was merged or closed.
These forms are detected, ignoring case. Identifiers in pull request titles, descriptions and commit messages are detected too.
| Form | Example | Resolves to |
|---|---|---|
KEY-<number> | HF-123, branch hf-123-retry | An issue in the pull request's project |
<owner>/<repo>#<number> | acme/api#45 | An issue in the pull request's project |
#<number> | Fixes #45 | The repository of that branch, pull request or commit |
gh-<number> | branch gh-45-fix | Branch names only, in that branch's repository |
KEYis a project key. Identifiers that point to an issue in another project don't create a link.- Sessions that stay on the default branch, and pull requests whose head is the default branch, aren't linked by branch match.
- If a session moves to another branch or worktree partway through, that work still links to the pull request on the branch it moved to.
How confidence is decidedUsage: Linking sessions to issues →
Pick the issue afterwards
A session with no confirmed link to any issue stays in Sessions as unlinked.
- Open Sessions in the sidebar and, under Work, set Issue to "Not linked".
- Click the session to open it, then click "Link to issue".
- Search issues by identifier or title, pick one and click Link.
You can also link from a trace.
- In the span details of a trace, click "Link to issue".
- "Link this trace to an Issue" opens. If the session is already linked, you'll see why (for example "It is linked to HF-123 automatically, through the branch
fix/ingest-retry.") and a "Linked now" row. - Before you type, up to five open issues from the same repository are listed as "Same repository". You can also search by key or title.
- Pick an issue and click Link to relink the session to that issue only. Pick "No Issue" and click Link to remove every confirmed link.

The Link to issue button in the span details header links this trace's session to an issue.
Trace (sample data)
Linking and unlinking by hand need the Member role or higher. Only issues in the session's own project are offered.
Check that it's linked
- Open the issue and confirm the session appears on the Sessions tab.
- The session also appears on the Timeline at the time it ran.

Linked sessions appear alongside the sessions on branches and pull requests linked to the issue.
Issue screen (Sessions tab) (sample data)
How to read itUsage: Read an issue's history →
FAQ
If I unlink a session by hand, does a resync bring the link back?
No. Once you unlink a pair by hand, branch names and syncs no longer link it automatically. Only linking it again by hand restores it.
Do sessions marked as inferred appear on the history?
No. Links inferred from the repository and overlapping time get confidence 0.6 or less and don't count as confirmed.
Can I open the pull request before the issue exists?
Yes. An identifier that doesn't resolve to an issue yet is kept, and if the issue is created on GitHub within 90 days of detection, the link is made then.