Text of docs.expo.dev › agentic-workflows › bug-triage as Styx crawled it on Nov 19, 2026. The page may have changed since. Only its words are kept, without pictures or layout, and only the first part of a long page.

Open the live page

Triage a bug report with an AI agent - Expo documentation

This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL. Triage a bug report with an AI agent Edit page Add an agentic workflow in which a coding agent reproduces a bug from a GitHub issue or TestFlight feedback on a remote Android Emulator or iOS Simulator. Edit page Bug triage is an automated workflow in which a coding agent tries to reproduce a bug report on a remote Android Emulator or iOS Simulator.

The report comes from a GitHub issue or from TestFlight feedback. When the agent sees the bug, a person reads the report and adds the agent label. Then Issue to PR opens a pull request (PR) with a fix, and Agentic CI tests the fix. How Bug triage works The highlighted steps run on Expo Workflows and Expo Simulators: 1 GitHub or TestFlight A bug report arrives as an issue or as tester feedback 2 Expo Workflows The workflow files feedback as an issue, and finds or builds the app 3 Expo Simulators A coding agent follows the steps of the report on a cloud simulator 4 GitHub The workflow posts the verdict and the evidence on the issue 5 Your team A person reads the report and adds the agent label 6 Expo Workflows Issue to PR opens a fix, and Agentic CI tests it Each bug report starts as a GitHub issue.

For TestFlight feedback, the workflow creates the issue with the comment of the tester, the device, and links to the screenshots. The workflow starts an Expo Simulators session with a build of the default branch. A coding agent follows the steps in the report and writes a verdict: REPLICATED or NOT-REPLICATED . The workflow posts the verdict on the issue. For a REPLICATED bug, a person reads the report and adds the agent label, which starts Issue to PR.

The agent tests a build of the default branch, not the build that the tester used. Add Bug triage with an AI agent Paste this into Claude, Cursor, Codex, or another agent. Add the Bug triage workflow to my Expo project. Use https://docs.expo.dev/agentic-workflows/bug-triage.md as the source for each step and each file. 1. Check each step on https://docs.expo.dev/agentic-workflows/setup.md. Check that the Agentic CI workflow from https://docs.expo.dev/agentic-workflows/agentic-ci.md and the Issue to PR workflow from https://docs.expo.dev/agentic-workflows/issue-to-pr.md are in the project.

Do each step that is not done. Use the version of .eas/agents/run-agent.sh for the agent that I name, and the version of .eas/agents/start-session.sh for the controller that I name: agent-device or Argent. 2. Create each file that the page shows, at the same path and with the same content. 3. When a step needs a token, an account, or a choice, stop and ask me. Do not print or save a token. 4. Run `eas workflow:validate` on each workflow file that you added.

5. Commit the files, but do not push them. Tell me which files you added and which commands I must run. Set up your project Follow Set up a project for agentic workflows one time for your project, including Add a GitHub token to Expo Services . See What the agent can do to learn which limits apply to the agent. Bug triage needs Agentic CI and Issue to PR , because they fix a replicated bug and test the fix. Add them first.

Add the Bug triage workflow 1 Update the GitHub helper This version of .eas/agents/github.mjs adds the create-issue command to the version from Issue to PR. Replace the file: .eas/agents/github.mjs import { readFile } from 'node:fs/promises' ; const repository = process . env . GITHUB_REPOSITORY ; const token = process . env . GITHUB_TOKEN ; if ( ! repository || ! token ) { console . error ( 'GITHUB_REPOSITORY or GITHUB_TOKEN is not set.

Add both to the preview environment of the Expo Services project.' ) ; process . exit ( 1 ) ; } async function request ( method , path , body ) { const response = await fetch ( ` https://api.github.com ${ path } ` , { method , headers : { accept : 'application/vnd.github+json' , authorization : ` Bearer ${ token } ` , 'content-type' : 'application/json' , 'x-github-api-version' : '2022-11-28' , } , body : body ? JSON . stringify ( body ) : undefined , } ) ; if ( ! response . ok ) { throw new Error ( ` GitHub returned ${ response . status } for ${ method } ${ path } : ${ await response . text ( ) } \nCheck that GITHUB_TOKEN can read and write contents, issues, and pull requests in ${ repository } . ` ) ; } return response . json ( ) ; } const repo = ` /repos/ ${ repository } ` ; const [ command , ... args ] = process . argv . slice ( 2 ) ; switch ( command ) { case 'issue' : { const issue = await request ( 'GET' , ` ${ repo } /issues/ ${ args [ 0 ] } ` ) ; const comments = await request ( 'GET' , ` ${ repo } /issues/ ${ args [ 0 ] } /comments?per_page=50 ` ) ; console . log ( JSON . stringify ( { title : issue . title , body : issue . body , comments : comments . filter ( comment => [ 'OWNER' , 'MEMBER' , 'COLLABORATOR' ] . includes ( comment . author_association ) ) . map ( comment => comment . body ) , } , null , 2 ) ) ; break ; } case 'comment' : { await request ( 'POST' , ` ${ repo } /issues/ ${ args [ 0 ] } /comments ` , { body : await readFile ( args [ 1 ] , 'utf8' ) , } ) ; break ; } case 'create-issue' : { const [ title , bodyFile , ... labels ] = args ; const issue = await request ( 'POST' , ` ${ repo } /issues ` , { title , body : await readFile ( bodyFile , 'utf8' ) , labels , } ) ; console . log ( issue . number ) ; break ; } case 'open-pull-request' : { const [ branch , title , bodyFile ] = args ; const owner = repository . split ( '/' ) [ 0 ] ; const open = await request ( 'GET' , ` ${ repo } /pulls?state=open&head= ${ owner } : ${ branch } ` ) ; if ( open . length > 0 ) { console . log ( open [ 0 ] . html_url ) ; break ; } const { default_branch : base } = await request ( 'GET' , repo ) ; const pullRequest = await request ( 'POST' , ` ${ repo } /pulls ` , { head : branch , base , title , body : await readFile ( bodyFile , 'utf8' ) , } ) ; console . log ( pullRequest . html_url ) ; break ; } case 'author-email' : { const user = await request ( 'GET' , '/user' ) ; console . log ( ` ${ user . id } + ${ user . login } @users.noreply.github.com ` ) ; break ; } default : console . error ( ` Unknown command " ${ command } ".

Use issue, comment, create-issue, open-pull-request, or author-email. ` ) ; process . exit ( 1 ) ; } 2 Add the job script .eas/agents/reproduce.sh #!/usr/bin/env bash set -euo pipefail : " ${BUILD_ID :? No simulator build. Check the build or repack job of this run.} " : " ${ISSUE_NUMBER :? No issue number. Check the intake job , or pass -F issue_number=<number>.} " : " ${PLATFORM :? No platform. Set PLATFORM to android or ios in the reproduce job.} " node .eas/agents/github.mjs issue " $ISSUE_NUMBER " > /tmp/issue.json source .eas/agents/start-session.sh " $PLATFORM " " $BUILD_ID " "Issue # $ISSUE_NUMBER triage" bug-triage { cat .eas/agents/reproduce.md printf '\n## Bug report\n\n' cat /tmp/issue.json printf '\n' cat agent-output/device.md } > agent-output/prompt.md env -u EXPO_TOKEN -u EXPO_TOKEN_SIMULATOR -u GITHUB_TOKEN \ timeout 20m bash .eas/agents/run-agent.sh agent-output/prompt.md device || true VERDICT = $( head -n 1 agent-output/evidence/verdict.md 2 > /dev/null || true ) PLATFORM_NAME = $( [ " $PLATFORM " = ios ] && echo iOS || echo Android ) VERDICT = ${VERDICT :- "INCONCLUSIVE : The agent did not write a verdict.

See the logs of this run."} SESSION_URL = $( node -p 'require("/tmp/session.json").deviceRunSessionUrl' ) { printf '## Bug triage (%s)\n\n**Verdict:** %s\n\n' " $PLATFORM_NAME " " $VERDICT " printf -- '- [Session recording](%s)\n' " $SESSION_URL " printf -- '- [Agent report and screenshots](%s)\n\n' " $RUN_URL " printf '<details>\n<summary>Report</summary>\n\n' tail -n +2 agent-output/evidence/verdict.md 2 > /dev/null || true printf '\n</details>\n' case " $VERDICT " in REPLICATED:* ) printf '\nTo start Issue to PR, read the report, then add the `agent` label.\n' ; ; esac } > /tmp/comment.m

The rest of this page is on the live site.