Integration overview
When you link a task to a Linear or Jira issue, Emdash:- Fetches issue details: Title, description, status, assignee, labels
- Seeds the agent context: Injects issue details as the first message
- Tracks the link: Stores the association in the database
- Generates branch names: Uses issue key/identifier in branch name
- Adds PR footer: Links the PR back to the original issue
You can link a task to Linear, Jira, or GitHub issues — but only one issue per task.
Linear setup
Generate a Linear API key
- Open Linear
- Go to Settings → Security & access → Personal API keys
- Click Create key
- Give it a name (e.g., “Emdash”)
- Copy the generated API key
Add the API key to Emdash
- In Emdash, create a new task (or go to Settings)
- Click Advanced settings
- Under Issue tracking, click Linear
- Click Setup
- Paste your API key
- Click Connect
Linear API implementation
Emdash uses the Linear GraphQL API to fetch and search issues.src/main/ipc/linearIpc.ts
Linear issue context injection
When a task is linked to a Linear issue:src/renderer/lib/taskCreationService.ts
Jira setup
Create a Jira API token
- Go to https://id.atlassian.com/manage-profile/security/api-tokens
- Click Create API token
- Give it a label (e.g., “Emdash”)
- Click Create
- Copy the token (it won’t be shown again)
Find your Jira site URL
Your Jira site URL is typically:You can find it in the browser URL bar when using Jira.
Add Jira credentials to Emdash
- In Emdash, create a new task
- Click Advanced settings
- Under Issue tracking, click Jira
- Click Setup
- Enter:
- Site URL: Your Jira base URL (e.g.,
https://company.atlassian.net) - Email: Your Atlassian account email
- API Token: The token you created
- Site URL: Your Jira base URL (e.g.,
- Click Connect
Jira API implementation
Emdash uses the Jira REST API v3 to fetch and search issues.src/main/ipc/jiraIpc.ts
Jira issue context injection
Similar to Linear, Jira issue details are injected as context:src/renderer/lib/taskCreationService.ts
Task creation workflow with issues
Here’s the complete flow when creating a task with a linked issue:User selects an issue
In the task creation modal:
- User clicks Advanced settings
- Selects Linear, Jira, or GitHub
- Searches for an issue
- Selects one from the results
Emdash fetches issue details
The integration service fetches:
- Title/summary
- Description
- Status/state
- Assignee
- Labels/tags
- URL
Task name is auto-generated
If the user hasn’t entered a custom task name, Emdash generates one from the issue:
src/renderer/lib/branchNameGenerator.ts
Issue context is seeded
Before the user’s initial prompt, the issue details are sent as a system message:This gives the agent full context before it starts working.
Pull request linking
When you generate a PR from a task with a linked issue, Emdash automatically adds the issue to the PR description footer.PR footer format
Issue badges in the UI
Linked issues are displayed as badges in the task list:src/renderer/components/TaskContextBadges.tsx
Credential storage
Linear
Linear API tokens are stored in the Emdash database (encrypted at rest by the OS). Location:- macOS:
~/Library/Application Support/emdash/emdash.db - Linux:
~/.config/emdash/emdash.db - Windows:
%APPDATA%\emdash\emdash.db
Jira
Jira credentials (site URL, email, token) are also stored in the database.Troubleshooting
Linear connection fails
Linear connection fails
Symptoms: “Invalid API key” or connection timeoutSolutions:
- Verify the API key is correct (re-copy from Linear)
- Check you have internet access
- Ensure the API key hasn’t been revoked
- Try generating a new API key in Linear
Jira connection fails
Jira connection fails
Symptoms: “Unauthorized” or “Invalid credentials”Solutions:
- Verify site URL is correct (e.g.,
https://company.atlassian.net) - Use your Atlassian account email (not username)
- Ensure the API token is valid (regenerate if needed)
- Check you have access to the Jira site
- Verify your account isn’t locked or suspended
Issue search returns no results
Issue search returns no results
Symptoms: Search doesn’t find known issuesSolutions:
- Linear: Search by issue ID (e.g.,
LIN-123), title keywords, or description - Jira: Try searching by exact issue key first (e.g.,
PROJ-456) - Check the issue is in a project you have access to
- Verify the issue isn’t archived or deleted
Issue context not injected
Issue context not injected
Symptoms: Agent doesn’t see issue detailsSolutions:
- Check the first message in the conversation — it should contain issue details
- If missing, the issue metadata may not have saved
- Try creating a new task with the issue linked
- Check the database for the task’s
metadatafield
Wrong issue linked to task
Wrong issue linked to task
Symptoms: Task shows the wrong issue badgeSolutions:
- Edit the task metadata to remove the issue link
- Recreate the task with the correct issue
- Currently, there’s no UI to change the linked issue after creation
PR footer missing issue link
PR footer missing issue link
Data types and schema
Linear issue summary
src/renderer/types/linear.ts
Jira issue summary
src/renderer/types/jira.ts
Database storage
Linked issues are stored in thetasks table’s metadata field:
conversations table for the main conversation.
Advanced: Custom issue workflows
You can extend the issue integration by:- Adding new providers: Implement a service for GitHub Issues, Asana, ClickUp, etc.
- Custom context formatting: Modify how issue details are injected
- Automatic status updates: Use webhooks to update issue status when PRs merge
- Bidirectional sync: Update Emdash tasks when issues change
src/main/services/LinearService.ts and JiraService.ts for implementation examples.
Next steps
- Adding providers — Add CLI agents to work on linked issues
- SSH connection setup — Work on issues from remote servers
- Troubleshooting — Debug common integration issues