This OpenComputer example contains two agents:
linear-ticket-summarizerlists current Linear issues or turns a specific issue into an implementation brief.self-improving-coderconsults the summarizer, edits this example's own attached source, and opens a draft pull request to improve the agents.
The loop is deliberately reviewable: the coder can open and watch a draft PR, but it cannot merge or deploy. A human merge triggers the repository's normal OpenComputer deployment.
Each pull request also gets an OpenComputer preview, so reviewers can exercise both agents before approving the change. Open the preview from the pull request check and start a new session to test the proposed revision in isolation.
- Node.js 22 or newer
- an OpenComputer project
- a Linear account connected to OpenComputer with OAuth
- the OpenComputer GitHub App installed on this repository with contents and pull-request write access and checks read access
npm install
npm run opencomputer -- login
npx opencomputer linkConnect the Linear account the summarizer should read from. OpenComputer holds and refreshes the OAuth credential; the token never enters the agent runtime:
npx opencomputer connection add linearYou can do the same from the project's Connections tab. Complete the Linear authorization using the URL OpenComputer provides.
Start the deployment watcher:
npm run devIn Agent → Settings → Repository access, allow only this repository.
Deployment source and working source are separate: GitHub deploys the agent
definition from the former. The runtime materializes the allowed working repository
in the coder's sandbox; the coder verifies its Git origin before editing and
publishing a PR from that working source. The coder declares its GitHub App
connection in code; the platform makes the short-lived installation credential
available to ordinary git and gh commands in its sandbox. This also works for
sessions created from Slack, where there is no setup form for attaching a source
manually.
Select self-improving-coder and send:
Improve yourself from ENG-123. Ask the Linear summarizer for a brief, make the smallest safe change, run verification, and open a draft PR against this repository. Do not merge or deploy it.
Expected result:
- the coder consults
linear-ticket-summarizeraboutENG-123; - the summarizer reads the issue through its read-only Linear connection;
- the coder materializes and edits an allowed copy of this repository and runs verification;
- the coder pushes an
oc/...branch and opens a draft PR withgh pr create; and - the session verifies the PR with
gh pr viewand reports its URL.
When the summarizer delegates an implementation brief to the coder, the coder uses that brief directly instead of consulting the summarizer again. This prevents a circular consultation from holding the original conversation until it times out.
npm test
npm run typecheck
npm run doctor- The example only issues read-only Linear queries through the managed OAuth connection.
- The summarizer can list the 50 most recently updated issues for status questions and read one issue in detail for implementation work.
- Ticket text and repository content are treated as untrusted evidence.
- Repository access should be restricted to this repository.
- Pull requests are always drafts.
- The agent never pushes to the default branch, merges, or deploys itself.
- A human review and merge is the promotion gate.
Linear's GraphQL API accepts either an issue UUID or shorthand identifier such as ENG-123; this example accepts shorthand identifiers and Linear issue URLs. See the official Linear GraphQL guide.
Note (auto-generated): This section was added by the
self-improving-coderagent on 2026-10-08 as a smoke-test to confirm that the agent has end-to-end GitHub access — clone → branch → commit → push → draft PR — without any human intervention beyond triggering the run. It is safe to delete this section once the test is confirmed.