DEV Community

Cover image for How to Bring Your Own Key (BYOK) to Linear's Cloud Coding Agent
Emmanuel Mumba
Emmanuel Mumba

Posted on Edited on

How to Bring Your Own Key (BYOK) to Linear's Cloud Coding Agent

On November 12, 2026, Linear shipped Bring Your Own Key (BYOK) for its cloud coding agent. If your company already pays OpenAI or Anthropic directly, or gets models through a gateway like OpenRouter or AWS Bedrock, you can now point Linear's agent at that account. You keep your negotiated rates and existing credits instead of buying model usage through Linear.

There's one catch the announcement mentions only briefly: BYOK covers the model, not the machine. Every agent session still runs in a Linear-hosted sandbox, and that sandbox is billed in Linear AI credits whatever key you use.

This guide walks through the setup, the settings that can trip you up, what the sandbox actually costs, and an option for teams that would rather run agents on hardware they already have.

What BYOK changes, and what it doesn't

A cloud coding agent session in Linear has two costs:

  1. Model tokens: the LLM calls the agent makes while it reads code, plans and writes changes.
  2. Sandbox runtime: the cloud machine the agent runs on while it clones your repo, installs dependencies and runs commands.

Before BYOK, both came out of your Linear AI credits. With BYOK on, your provider bills you for tokens directly. Sandbox runtime still comes out of Linear AI credits, so your workspace needs a credit balance even with BYOK turned on.

Every coding session has two costs: model tokens go to your provider with BYOK, sandbox runtime always uses Linear AI credits

You can connect through:

  • OpenAI
  • Anthropic
  • AWS Bedrock
  • Azure OpenAI
  • Claude in Microsoft Foundry
  • OpenRouter
  • Vercel
  • Any gateway that supports the OpenAI Responses API or the Anthropic Messages API

One thing to know up front: you need an API key. A ChatGPT Plus or Claude Pro/Max subscription won't work here.

What you need before you start

  • A Linear workspace on a current plan (Free, Basic, Business or Enterprise). Legacy plans don't support the coding agent or BYOK.
  • Owner or admin access in Linear.
  • GitHub organization owner access, to turn the cloud coding agent on.
  • An API key from your provider, or an Anthropic organization where you have the Owner, Admin or Billing role.
  • A Linear AI credit balance for sandbox runtime.

Only one admin needs to set this up. Everyone in the workspace then uses that connection, and members don't need their own keys.

Turning on BYOK in five steps: enable the agent, open Inference, connect a provider, test the connection, pick the model

Step 1: Turn on the cloud coding agent

If your workspace isn't using the agent yet, go to Settings > AI & agents > Cloud coding agent and set the dropdown to Enabled. On Enterprise you can pick Enabled for teams… to roll it out to some teams first.

Then create an environment under Workspace settings > Linear Code > Environments. An environment holds one repository, and that repository has to be available through your workspace's GitHub integration.

Step 2: Open the Inference settings

Go to Settings > Linear Code. Below Agent configuration you'll find an Inference section with two rows:

  • Anthropic, which powers Claude Code
  • OpenAI, which powers Codex

Each row starts on Linear credits. You can switch one row to your own key and leave the other on Linear credits, or switch both.

Connection options for the Anthropic row and the OpenAI row, with the API format each one needs

Step 3a: Connect Anthropic

You get three options on the Anthropic row.

Anthropic organization. Choose it, select Continue, sign in to Anthropic, pick your organization and approve. There's no key to copy and paste. Two conditions apply:

  • Anthropic has to bill the organization directly, not through AWS, Google Cloud or Azure.
  • The person approving needs the Owner, Admin or Billing role in that organization.

You manage spend limits for this connection in the Claude Console under Connected platforms.

Cloud provider. Choose Amazon Bedrock from Provider, then enter your AWS region and API key.

Custom endpoint. Enter an Endpoint URL and an API key. Use this for a gateway such as OpenRouter or Vercel, or an internal proxy. The endpoint has to speak the Anthropic Messages API.

Step 3b: Connect OpenAI

On the OpenAI row, select OpenAI API key, then Add OpenAI API key.

  • To connect to OpenAI directly, choose OpenAI from Provider, paste your API key and select Save.
  • To use a gateway or Azure OpenAI, choose Custom endpoint and enter the Endpoint URL and API key. The endpoint has to support the OpenAI Responses API.

Step 4: Test the connection

For any connection that uses an API key, select Test connection before Save. A typo in the endpoint URL is much easier to catch here than halfway through someone's coding session.

Step 5: Pick the model

The workspace model is set in Cloud coding agent settings, and it applies to all coding work in the workspace from then on. The default, Auto, currently resolves to GPT-6 Sol. You can also pin a specific model:

  • Anthropic: Claude Opus 5.5, Claude Fable 5, Claude Opus 5, Claude Opus 4.8, Claude Sonnet 5
  • OpenAI: GPT-6 Sol, GPT-6 Luna, GPT-5.6 Sol, GPT-5.5, GPT-5.4

If you've only connected one provider, pick a model from that provider. Otherwise the agent's usage will still go through Linear credits.

Gotchas worth knowing before you switch

These come straight from Linear's docs, and they're easy to miss.

Five things to know before you switch to BYOK

  • There's no fallback for a Claude organization. If you connect an Anthropic organization and it hits its spend limit, Linear won't fall back to Linear credits. Coding work stops until an admin raises the limit. Set the limit with that in mind.
  • Provider changes only apply to new sessions. Sessions that are already running keep their original provider. If you rotate or revoke the old key, those sessions can't resume, so keep it valid until they finish.
  • Environment variables are visible to the agent. Only variables marked Secret are hidden, and those are only available while the sandbox is being prepared.
  • GitHub IP allow lists. If your GitHub organization uses one, you have to allow the cloud coding agent's IPs.
  • You can switch back at any time. Set either row back to Linear credits in Settings > Linear Code.

The part BYOK doesn't cover: sandbox runtime

This is the cost that stays with Linear. Sandbox runtime is billed in 5-minute increments, and bigger sandboxes use more credits for the same time:

CPU Memory Per 5 minutes Per hour
1 vCPU 8 GB $0.03125 $0.375
2 vCPUs 16 GB $0.0625 $0.75
4 vCPUs 32 GB $0.125 $1.50
8 vCPUs 64 GB $0.25 $3.00

Per-hour figures are the 5-minute rate Γ— 12. Rates are from Linear's AI credits docs as of November 2026.

Sandbox runtime cost per hour by size, and an example team paying about $103 a month

You choose the sandbox size under Configure an environment, and the change only applies to new sessions.

For one developer trying the agent out now and then, these numbers are small. They add up once the agent is part of daily work. Say a team runs 15 sessions a day, each about 25 minutes, on a 2 vCPU sandbox. That's 75 increments a day, or about $4.69 a day, which comes to about $103 a month over 22 working days. That's on top of the model tokens your provider now bills you for. A repo that needs the 8 vCPU sandbox for its build quadruples that.

It isn't a big number for most companies, and you get a managed, isolated machine for it. But if the reason you turned on BYOK was to stop paying twice for AI, you're still paying twice, just less.

Another option: run agents on machines you already have

If your team already has capable laptops, a spare office workstation or a cloud VM you pay for anyway, there's a different setup to consider: let agents run on those machines instead of a rented sandbox.

Sharkly.ai works this way. It's a shared workspace where people and AI coding agents are assigned tasks from the same board. Agents run on Computers you connect: your own laptop, an office machine, a cloud server, a VM or a Docker container, on Windows, Mac or Linux. There's no hosted sandbox, so there's no runtime meter.

The model side is BYOK too, and it's looser than Linear's. Agents run on the coding plan or API key you already have for tools like Claude Code, Codex or Cursor. So if your developers already pay for a Claude Code or Codex subscription, the agent can use that, while Linear asks for an API key.

If you don't want to leave Linear, you don't have to. According to Sharkly's site, it can two-way sync with Linear (as well as Jira, Asana, GitHub Issues, GitLab Issues and Shortcut). Your issues stay in Linear, and the agent work runs on your own hardware.

Running agents on your own machine with Sharkly: register the Computer, create an Agent, assign a Task, review

What you get besides skipping the meter

The cost difference is what started this comparison, but most of what Sharkly does is about working with agents as part of the team.

  • Agents are teammates on the board. An Agent takes assigned Tasks, writes comments, updates the Task's status and leaves an execution trace. People, Agents and Crews can all be assignees, so assigning work to an agent looks the same as assigning it to a person.
  • You pick the model per Agent, and per Task. By default an Agent uses its Runtime's model. You can choose another from that Runtime's model list, or set a different model for a single Task. Hard bugs can go to your strongest model while routine work stays on a cheaper one.
  • Instructions and Skills you write once. An Agent's instructions go into every run: its scope, when to ask for input, how to report. Reusable procedures live in Skills, which can be shared across a Space.
  • Crews for work that needs more than one agent. A Crew is a group of people and Agents with a leader Agent. Assign it a Task and the leader starts first, then either does the work or @ mentions the other Agents. Their results land in the Task's chat.
  • Follow-ups happen in the Task. If a result is off, @ mention the Agent in a comment and it continues on the same Task. A plain comment doesn't start a run, so people can discuss a Task without kicking off agent work by accident.
  • Git history that shows who did what. Isolated runs commit to a branch named sharkly-agent/<agent>/<task-identifier>. By default, commits name both the person who triggered the run and the Agent, with a Co-authored-by trailer.

Setting it up

  1. Install and sign in to a coding tool on the machine that will do the work, such as Claude Code, Codex, Gemini or Pi Agent.
  2. Connect the Computer. In Sharkly, open the Computers page, create a one-time install token, then run this on the machine:
   sharkly computer register --install-token <install-token>
Enter fullscreen mode Exit fullscreen mode

This registers the machine and starts a small local service. The service connects outward to Sharkly, so you don't need to open any inbound ports. It then detects which coding tools are installed. (The desktop app can do this step for you during sign-up.)

  1. Create an Agent. Open Agents > New Agent, choose Code development, point it at a repo (automatic Git cloning or a local directory) and select your Computer.
  2. Assign a Task. Set the Agent as the Assignee, the same way you'd assign a teammate. Assigning it starts the run.
  3. Review. The execution log shows what the agent is doing, its conclusions and blockers show up as comments, and anything that needs you lands in Inbox. Each run gets its own git worktree, so agents working in parallel don't overwrite each other's changes.

What happens during a run

A run brings together three things: the Task, the Agent assigned to it, and a Runtime (a coding tool like Claude Code) on one of your connected Computers. The Task stays the shared record that people and agents both work from.

  • The Agent gets the full context. Each run receives the Task details, the statuses it's allowed to use, the Agent's instructions, its Skills, the repositories and the environment settings.
  • Backlog is a safe parking spot. Assigning a Task that's still in Backlog doesn't start anything. The run starts when you move the Task out of Backlog.
  • Queued runs wait for the machine. If the Computer is busy or offline, the run shows as Queued with the reason, and it starts once the blocker clears. You don't need to retry it.
  • Parallel work doesn't collide. Different Tasks can run side by side, each in its own worktree. If an Agent works directly in a folder instead, runs in that folder take turns.
  • Problems come to you. Failed and blocked runs land in the Inbox, and the execution log shows what went wrong.

Sharkly is free for teams of up to 5 people with the full product. After that, the Team plan is $7 per user per month. Compute and models are on you, and that's the point.

The trade-off

Running on your own machines isn't free in every sense:

  • The machine has to be on. If the agent's laptop goes to sleep, its runs sit in the queue. They wait up to 24 hours by default, then fail. For agents that keep going overnight, use an always-on office machine or a cheap VM.
  • You own the environment. Repos, credentials and dependencies have to be set up on that machine. A managed sandbox does this for you.
  • Isolation is your call. A Linear sandbox is a fresh machine each time. On your own hardware, the agent works in a git worktree on a real computer, so think about which machine you connect and what it can reach.

Which one fits your team

Where the bill goes: Linear cloud agent with BYOK compared with Sharkly

Linear cloud agent + BYOK Sharkly
Model billing Your provider (API key) Your provider (API key or existing coding plan)
Where the agent runs Linear-hosted sandbox Your laptop, server, VM or Docker
Runtime cost Linear AI credits, billed in 5-minute increments None from Sharkly (you pay for your own hardware)
Setup effort Low: managed environment Medium: you prepare the machine
Agents Claude Code, Codex Claude Code, Codex, Cursor, Gemini, Pi and others
Issue tracker Linear Sharkly's board, with two-way sync to Linear, Jira and others

Stick with Linear's cloud agent + BYOK if you want zero environment setup, your team lives in Linear, and the sandbox bill is small next to your token spend.

Look at Sharkly if you have hardware sitting idle, you want agents to use the subscriptions your developers already pay for, or you want people and agents on one shared board without a per-minute meter.

FAQ

Can I use my ChatGPT or Claude subscription with Linear's BYOK? No. Linear needs a provider API key or a connected Anthropic organization.

Does BYOK make Linear's coding agent free? No. Your provider bills model tokens, and sandbox runtime still uses Linear AI credits.

Can I use OpenRouter or Vercel AI Gateway? Yes. Use Custom endpoint on the row that matches the API format your gateway speaks: Anthropic Messages API or OpenAI Responses API.

What happens if my Anthropic spend limit runs out? Coding work stops until an admin raises the limit in the Claude Console. Linear doesn't fall back to Linear credits for a Claude organization connection.

Do all members need their own key? No. One admin sets it up for the whole workspace.

Wrapping up

BYOK is a good change. It lets teams with existing provider deals use them inside Linear, and setup takes a few minutes. Just budget for what it leaves out: the sandbox still runs on Linear's meter. If that matters for your team, running agents on machines you already own is a real alternative, and with Linear sync you can keep your issues where they are.

Top comments (0)