Rensei docs

Linear (CLI)

Platform Linear proxy.

The rensei linear command group is implemented in the OSS donmai runtime and documented at donmai.dev/docs/cli/linear. This page explains how the platform proxy layer changes the behavior of those commands when running under Rensei.

rensei linear exposes the donmai linear subcommands with one critical difference: agents and operators never need a LINEAR_API_KEY in their environment. All Linear API calls are routed through the Rensei platform proxy, which exchanges the call for an org-scoped OAuth token stored in the platform credential store.


How the proxy works

When rensei linear (or an agent using the rensei linear proxy internally) makes a Linear API call:

The CLI or agent issues the call to the local credential socket at RENSEI_CREDENTIAL_SOCKET.

The daemon forwards the request to the platform proxy endpoint at app.rensei.ai/api/proxy/linear.

The platform proxy authenticates the request using the org's stored Linear OAuth token (provisioned via rensei project trackers connect linear).

The Linear API response is returned through the proxy to the caller.

The OAuth token is never surfaced to the agent process. If LINEAR_API_KEY is set in the worker shell, it takes precedence over the proxy path - but this is not recommended for production use because it bypasses org-level OAuth scoping and audit.

If the proxy returns 401, the agent stops and surfaces the error - it does not hunt for credentials. The most common cause is that the Linear OAuth token needs to be re-provisioned (the app's OAuth scopes were updated). Run rensei project trackers connect linear to re-authorize.


Required OAuth scopes

The platform OAuth app requires these Linear scopes for full AgentSession functionality:

ScopeRequired for
readReading issues, comments, projects
writeCreating and updating issues and comments
issues:createCreating new Linear issues
comments:createPosting agent comments
app:assignableAssigning the agent app to issues
app:mentionableMentioning the agent app in comments

The app:assignable and app:mentionable scopes are required for AgentSession activity (agent thoughts and responses visible in the Linear UI). They are provisioned automatically by the OAuth flow in rensei project trackers connect linear. They are not provisioned when using --api-key.

See Linear integration for the full OAuth setup guide and AgentSession lifecycle details.


Command reference

The following subcommands are available. For flag and argument details, see the OSS docs.

SubcommandDescriptionOSS docs
rensei linear issues listList issues matching filtersdonmai.dev/docs/cli/linear
rensei linear issues showShow issue detaildonmai.dev/docs/cli/linear
rensei linear issues createCreate a new issuedonmai.dev/docs/cli/linear
rensei linear issues updateUpdate an existing issuedonmai.dev/docs/cli/linear
rensei linear comments listList comments on an issuedonmai.dev/docs/cli/linear
rensei linear comments createPost a commentdonmai.dev/docs/cli/linear
rensei linear teams listList teams in the orgdonmai.dev/docs/cli/linear
rensei linear projects listList projectsdonmai.dev/docs/cli/linear

Troubleshooting

Proxy returns 401

The org's Linear OAuth token is missing or expired.

# Re-authorize the Linear integration for the active project
rensei project trackers connect linear

If the issue persists, check whether the Linear Application has been revoked in your Linear workspace settings and re-authorize.

Agent runs but Linear UI shows no activity

The OAuth token likely lacks app:assignable + app:mentionable scopes. This happens when the connection was created with --api-key instead of the OAuth flow.

# Check current tracker configuration
rensei project trackers list

# Re-run the OAuth flow to reprovision scopes
rensei project trackers connect linear

LINEAR_API_KEY in agent environment

If LINEAR_API_KEY is set in the daemon's environment or inherited from the shell, it overrides the platform proxy. This bypasses org-level audit. Remove it from the daemon's env and rely on the proxy instead.


On this page