Self Healing Playwright Test Workflow using Github Actions and Claude Agent SDK
Ramya Authappan26:532026
Left unguarded, AI agents fix the app code just to make tests pass
Every failing end-to-end test can cost a developer two to four hours of logs, stack traces and local replays. Hand the job to an unguarded AI agent and it may change application code just to turn the test green. Ramya Authappan, a QE architect with 15+ years in quality engineering who built a self-healing Playwright pipeline for a client, tackles the question: which failures should an agent fix, and which belong to humans?
Get the guardrails, MCP tools and failure triage that let an AI agent heal Playwright tests safely
Ramya Authappan explains how she built a self-healing Playwright workflow in which a pull request slash command triggers a GitHub Action and a CI pipeline running an agent built on Claude Agent SDK and Playwright Test MCP. The agent reproduces and classifies each failure, then either commits a minimal test fix or reports a backend bug to humans. She argues that strict guardrails and a human in the loop are what make the approach safe.
“Should it fix the code so that the test passes? Or should it fix the tests so that the code is, is verified, right?”
“So yeah, when it is an actual application error or a bug, it does not try to fix it. It would just report back with all the analysis and calls for human intervention.”
What you will learn
Design a slash-command workflow where a PR comment triggers a GitHub Action and a CI healer pipeline running a Claude Agent SDK agent.
Use Playwright Test MCP tools (test_run, test_debug, test_list) so an agent reproduces and debugs failures the way an engineer would.
Write prompt-file guardrails: edit only Playwright tests, apply minimal stack-trace guided fixes, ban timeout band-aids and cap iterations.
Classify failures as selector drift, backend bugs or environment issues before letting an agent change anything.
Decide when to relax rules in an interactive local mode versus a strict autonomous CI mode.
Key takeaways from the speaker
How Playwright Test Healer integrates with Claude Agent SDK and MCP for AI-powered test context
How Single slash command triggers autonomous debugging and fixes using AI agents
Seamless GitHub Actions workflow for automated test healing and intelligent failure analysis
Quantitative results: reduced MTTR, increased test stability, reclaimed developer hours
Details
Level
Intermediate
Format
Tech talk
Technical depth
Practitioner
For
Mid-career, Senior individual contributor
Length
26:53
Published
July 2026
Questions this talk answers
Why isn't pasting a stack trace into a chatbot enough to fix a failing Playwright test?
A chatbot can offer reasoning, but real debugging means reproducing the failure, running the test in a browser and inspecting it. MCP servers such as Playwright Test MCP give the agent the tools to do exactly that, which makes its analysis more accurate.
Should a self-healing agent change the application code or the test?
In CI mode the agent may only edit the Playwright tests, because agents have been seen changing application code just to make a test pass. If logs show a backend bug or a 400 or 500 error, it reports its root cause analysis in a PR comment instead of fixing anything.
What guardrails keep a test-healing AI agent safe?
Apply only the minimal fix, make stack-trace guided changes only, avoid unnecessary refactoring and never add timeouts as band-aids for flaky tests. The agent also runs as a non-root user and stops at a maximum iteration limit (50 in her setup), after which a human steps in.
What is the difference between Playwright MCP and Playwright Test MCP?
Playwright MCP is used for browser automation, while Playwright Test MCP is specific to test automation. Only Playwright Test MCP exposes the test_run, test_debug and test_list tools.
How does running the healer locally differ from running it in CI?
Locally, as a Claude skill, the developer watches the debugging and chooses which changes to accept, so the rules are relaxed and the agent can also fix application code. In CI it runs autonomously, so the rules stay strict.
About this talk
Modern web applications demand robust end-to-end test coverage, yet maintaining Playwright test suites at scale remains a persistent engineering challenge. Flaky tests, selector drift, and timing issues can consume significant developer time—time better spent on feature development.In this talk, I'll share how we built a fully autonomous test healing pipeline that transforms how our team handles E2E test failures. Our system leverages the Model Context Protocol (MCP) to create an intelligent agent that doesn't just identify failures—it fixes them.What you'll learn:
The Architecture: How Playwright Test Healer integrates with MCP to provide AI agents with deep test context, browser automation capabilities, and codebase awareness
CI/CD Integration: Our approach to embedding the healing workflow seamlessly into GitHub Actions, including failure detection, triage, and automated fix generation
Developer Experience: How we simplified the entire workflow to a single slash command—/fix-playwright-test <test_file>—that triggers autonomous debugging, generates fixes, and commits suggestions directly to your PR
Real-World Impact: Quantitative results showing reduced mean-time-to-recovery, increased test stability, and reclaimed developer hours
The result? A paradigm shift from reactive debugging to proactive test maintenance. When tests fail in CI, an AI agent analyzes the failure, navigates the application, identifies the root cause, and proposes fixes—all without human intervention.This isn't just about fixing broken tests; it's about reimagining developer productivity in the era of AI-assisted development.
No timeout band-aids: guardrails for AI fixes (46 s)
Why a human stays in the loop (73 s)
All right. So welcome, everyone. So let's get started. So today, I'll be talking about self-healing playwright test workflow that I worked on using GitHub Actions and flawed agent SDK. So this is something that you can use along with any CI server that you have. So you can just use this as a template, right? So, yeah, before we could proceed further. So I am an independent quality engineering consultant and I work with a few clients as and when opportunities come in. And I also do a bit of consulting as well.
All right. So the problem that we are going to solve, that this entire thing solves is actually, yeah, the failing tests, end-to-end tests break. This is something that we, I mean, this is a very common scenario and it may be in the GitHub PRs, like the end-to-end tests failed and the developers, they spend a few hours debugging, looking at the logs and fixing and trying to fix it. Or if it is an end-to-end test, most of the time, the quality engineering team is actually pinged and they are asked to look into it and so on and so forth. So these things do things do happen every day. So that's the problem that we are trying to solve. What if we have a tool that can autofix failures itself, right?
So, yeah, there are challenges. So, yeah, the reason for the failure could be multiple things, like maybe a code change that broke the test or, and yeah, the selector could have changed or it could just be a flaky test or it could be a genuine failure as such, right? Like the code was changed intentionally and the test needs to be done.
So, the reason could be multiple things. But then how do we narrow down on the actual failure or how do we build this intelligence as part of this workflow? So that's what we are going to look into. So, yeah, usually what happens is this is what happens, right? Like until now, like whenever there's a failure in the CI servers, in the CI or in the PR, like if you see the developers are even the quality engineers, they investigate, they look into the logs, they look into the logs, they look into the logs and they look into the logs and what they're going to do.
Look at the stack traces and try to figure out what went wrong or what the recent code change was and try to replicate it locally. So, yeah, usually what happens is this is what happens, right? Like until now, like whenever there's a failure in the CI servers, in the CI or in the PR, like if you see the developers or even the quality engineers, they investigate, they look into the logs and look at the stack traces and try to figure out what went wrong or what the recent code change was and try to replicate it locally.
And try to debug and try to debug and find the root cause, right? So, yeah, approximately it could take anywhere around like two to four hours per failure, right? So that's what it had been until now. So what happens, like what exactly is, I mean, how can we actually make this better or how can we make this entire workflow quicker? So that's what this whole thing talks about.
So imagine if we have something like a slash command, say slash fix playwright test, and yeah, it would actually take the failing test as a parameter, or we could even build that intelligence where it could look into the last failed build and it could pick the failed test. But yeah, but yeah, for simplicity sake, let's say that this slash command takes the failing test as an input parameter, okay? So what if we have such a command, and yeah, the magic happens, and it actually gives you an analysis of what actually went wrong, why the test failed, and what needs to be fixed? And even more, like if it is a, if it's something that could, it's, if it is a simple fix, like a selector,
a selector update, and so, like that could also be auto-committed as well. So that's what we are going to see. And for this, there are a couple of AI tools, and yeah, by now, I'm sure like most of us would be familiar with cloud, for sure. And there are a lot of cloud ecosystem in itself is, it has a lot of things in it, cloud skills is something that we'll touch a little bit upon. And for this, I actually used cloud agent SDK. That's what actually does the entire thinking, and that's the autonomous brain that would do the analysis, right? So the concept is simple, like, okay, maybe the next slide, I can walk you through it. Yeah, so this is the actual workflow, right? In the PR, we see that a test is failing, right? And what we actually want to do is,
what we actually want to do is, we just give a slash fixed playwright test command. And what this would this command would do is like, it would actually invoke a GitHub action. So we have, we have a GitHub action defined, which would get triggered on, on typing in this comment, comment, and the comment should be starting with slash fixed playwright test. So yeah, it gets triggered. And what exactly does it do? It triggers, and it acts as well. And what we have to do? And what we have to do? And what we have to do?
And what we have to do is, we have to do is, we have to do a framework that we have to do a framework that we built using cloud agent SDK, right? So where does this cloud agent SDK reside? So the cloud agent SDK, it actually, so when I say cloud agent SDK, so it is a framework that we built using cloud agent SDK, which actually resides within the CI server.
And in my case, like, in the client's place where I built this, so the, the CI server that was used, was built kite, right? This could be anything else, like it could just be GitHub itself, or it could be Jenkins and anything like you can just, you can replace this with anything. So for this example, I'm just using built kite, because that's what I built with. So inside built kite, we have this, this framework. So what this framework does, it actually uses, underneath it is, it is completely built, using cloud agent SDK, underneath it invokes cloud agent SDK, and what input does it take, and what output does it give, it actually takes in a prompt file and gives, that's the input, and the output would be the analysis that it has done, right? So that's what it does. So in as part of the prompt file is where we define all
define all the rules related to the debugging and the analysis and the fixing of it. So let's dive deep into it in the next slides. So yeah, so imagine that inside the CI server, we have an autonomous AI brain. And that's what I call the, which is actually powered using flawed agent SDKs, right? So whenever there's a failure, you invoke this, you give it to this autonomous brain, and it would actually do the thinking, do the analysis and give you its analysis. That's pretty much it. So yeah, so it invokes the flawed agent, which does the debugging, fixing and verifying of the fix. And, and yeah, and it auto commits if, yeah, this is a conditional thing, if it is a failure that it could fix, it would be auto committed. I'll touch that part as well. Because
when we talk about self healing tests, right, there are, it's, there's something that we need to keep in mind. Because when I, when the AI agent fixes a test, a failing test, which part of it should it fix? Should it fix the code so that the test passes? Or should it fix the tests so that the code is, is verified, right? This is a call. This is where we actually get stuck. And this is a very crucial part, which needs to be handled carefully. Because, yeah, so it because sometimes we have seen that as well, wherein, the AI agent just to make the test pass, it would fix the application code, which is not at all, right, right, right. So that is exactly the reason why we need to have the required guardrails.
Yeah, I think we spoke about this, right. So we give a slash command, and the failing test, the GitHub action is invoked. And, yeah, and it triggers the build kite healer pipeline via the API. So there is a CI pipeline that gets triggered in inside that pipeline is where we are invoking the cloud agent SDK. And as part of this, what we do is like, and how it actually does is like, inside this cloud agent using, we use cloud agent SDK, but in turn, it uses Playwright test MCP, a couple of MCPs, Playwright test MCP, and the Chrome dev tool MCP, right. So, okay, so a simple question, right, like, we have a failure, we have the stack trace, we can just copy it and paste it in, maybe chat GPT,
or in cloud, it would definitely give out some reasoning, right. And also, if it has the context of the code, it might be a slightly better, like, yeah, looking at the code and looking at where it has failed, it would give some reasoning. But still, that that's not like a, I mean, that that's not like a complete solution in my view, because, well, how do we debug it? Like, if there is a failure, how do we do debug it, like, we try to replicate it, and we try to invoke the test, and we see the browser spinning up, and the tests are run, and it failed somewhere. And then we look at the stack trace and so on, right. So that is exactly what I want my cloud, my agent to actually do. So that is the reason we
need to use these MCP servers, like, which, which are like, which has a bunch of resources and tools, which makes the analysis even more accurate. For instance, in this case, we use Playwright test MCP server, MCP server, that's the main MCP server used. And yeah, the Chrome Dev tool MCP is just for all the browser automation and interactions we use that gets invoked. But I'm more, I want to focus more on the Playwright test MCP server, which has a couple, yeah, these are the three tools that it actually exposes, right, test run, test debug and test list. So these are actually part of the Playwright agents that got released last year, I think sometime in last September. So basically, what this does is like, when we use these tool calls inside our prompt file, it actually, you can actually see when you run
the cloud agent SDK, or when you invoke the AI agent, it would spin up a browser, and it would try to run the test, and it will see that the test is failing, it will collect all the failure artifacts. And the test underscore debug is actually an interactive DOM inspection, which actually does a real debugging, like how we do as a person, like in person, when we try to debug a failure, similarly, the AI agent would actually using it uses this tool test debug, it actually tries to do the debugging, and then it will narrow down on the root cross. So and yeah, test underscore list is just just list the available tests.
So yeah, so using such MCPs are crucial and essential when we build AI agents like the relevant MCP. And for our case, Playwright test MCP is what makes makes it more successful and accurate. And yeah, another thing that you need to keep in mind this, this is not Playwright MCP, this is Playwright test MCP, there are two different MCPs. And the Playwright MCP is usually used for browser automations. Playwright test MCP is more specific to test automation. And only the Playwright test MCP has these tools exposed.
Right, so yeah, so once the cloud agent or the AI agent is invoked, what it does, it reads the code context. And it has the context of the entire code base. And it has the page objects and the Playwright test, all of that is already available to it. And yeah, as I mentioned earlier, it would run the test using Playwright test MCP, and debug it using test underscore debug tool, tool call. And then one thing that we clearly mentioned is like, apply only the minimal fix that is needed to fix it. Because otherwise, we have seen that when we don't have such specific guardrails, it would just try to optimize even further saying, hey, this could also be fixed. And this can also be made better and stuff, stuff like
that. But that's not something that we want, we are more we wanted to be more focused on fixing the failure alone. So yeah, apply only the minimal fix. And yeah, I'll there is before it applies the minimal fix, there is one more layer to it, which is the root cost analysis. I think that's in the next slide, I'll touch on that. So yeah, this is what happens. And it would keep repeating it until the test passes and the fixes verified. Right. And few guardrails that we have as part of this is this AI agent can only edit the Playwright folder or the Playwright tests alone, it cannot change the application code, because that is like the base rule that we have because we just go by the rule that it's the Playwright test that is
failing and just be bothered about fixing this alone. And if in the logs, if yeah, I think that that will come in the next slide. If at all, there is some failure, which shows safe, there's a 400 or 500 HTTP error. It clearly means that there is something wrong with the application, right? In such cases, it actually reports back with the actual failure without applying any fix or trying to fix. So that's the root cause analysis layer. So yeah, so these are a few guardrails and no timeout band-aids allowed, meaning like sometimes as part of fixing it, especially when it is a flaky test, it would just add more timeouts and saying, hey, this is a fix that I've added. So that's not acceptable.
It doesn't. So such things need to be handled as well. So no unnecessary refactoring and stack trace guided changes only. And yeah, in CI, another thing that we caution that we took was like this cloud agent SDK, this entire AI agent can only get executed as a non-root user. So that is like a safety measure just to be safer because it does have, I mean, we do restrict and add all the guardrails, but still it's always good to have more such conditions. And yeah, we also have a max iteration limit as well. Meaning like, as you see here, the steps, right? Like it would read the code, run, debug, try to apply, verify the fix. If it doesn't fix, then again, it would repeat all the steps and try to
see the new failure and try to fix. But how long can it go? So we need to have a threshold for it, where it could stop. So 50 iterations is what we have. But again, it is, it depends on, yeah, it could vary and it depends on the code base and how well that the entire tests and tests started and then so on. So, yeah, so basically like we need to have a max iteration at which it stops.
So what happens when it hits the max iteration? It abruptly stops. Yeah. And then, yeah, a human intervention is needed. So that's how it is designed as of now, because we don't want to want it to go on and a longer loop and keep trying to fix it for a longer time. There needs to be a max limit for that.
All right. So, yeah, when we try to, so this is a very important part of this entire AI agent workflow. So, when we try to debug and narrow down on the root costs, right, there could be multiple things which could cause the failure. It could be a real, as I mentioned, like it could be a real issue with the test, like the code has changed and the test needs to be updated. In that case, yeah, usually it could just be a selector mismatch or text or label changes or visibility and state issues. These are like really eligible candidates, which could be auto fixed by the agent. Right. And for instance, if the test fails because of some backend bug or backend issue. So even those things will be, they can be identified as
part of this when we run this workflow. How do we do that? We actually, we also give, of course, it has the stack trace and all the failure artifacts. Apart from that, we could also give it more context in the sense that the test.log or the application log could be a very good input for this entire workflow because it shows like where the failure has occurred, like what kind of failure it could be. If it's a 500 error in the logs, then it would just try to relate it. Since it also has the code-based context, it would be able to relate all of this, like the error in the log, the code base, the code, and also the test failure. And it would be able to arrive at a better analysis report. So yeah, so
providing such context, right? Like the logs is any kind of logs. So that is a very good input for this entire thing. Yeah, it could, it actually classifies based on this, like if it's a backend bug, it would just do the root cause analysis and it would report back. Maybe it actually adds a comment in the PR saying that this is, this is what I see in the logs. Maybe you might have to take a look. So yeah, when it is an actual application error or a bug, it does not try to fix it. It would just report back with all the analysis and calls for human intervention. Yeah, apart from that, it could also be a test environment issue. Maybe like the mocks or the test data is stale or yeah, maybe a feature flag config that needs to be
updated and stuff like that. So yeah, those are also reported as part of this analysis. So basically, the failure classification is a very important step, which actually helps to narrow down on the actual root cause. And yeah, so okay, so this is just the part of the workflow itself. So since it's a slash command in the PR, it is already part of the CI system itself. And I think I already touched on this, like we're in like, yeah, we run it as a non root cloud user, and then the cloud agent, or I'm just using it interchangeably, the cloud agent, AI agent, or cloud agent SDK, it's all I'm pointing to the same framework, which is residing inside the CI server, in my case. All right, so yeah, so what happens once it does the
analysis, it would actually, a couple of things it does, if it has fixed, say, for instance, there is a selector mismatch, then it would actually fix the selector in the playwright page objects, and it would commit it to the same branch, and it would report back in the PR saying, hey, this is what failed, and this is the fix that I have applied to the PR, please take a look. So that's, that's what it would report back. And if it is, as we saw earlier, like if it is a backend bug or any application issue, and also if there is a, it also has the browser console logs, like the context of it as well. So if there is something that's going wrong in the, if there are console logs showing errors, even that is used as part of
the classification of the failure. So, yeah, based on that, it would report back in that case, it wouldn't do any code change per se, it would just report back to the, with a PR comment saying, hey, this is the error, and this is what I see in the logs, and this is, this is the root cause analysis, take it forward from here. So that's what happens in case of code application issues, or if the code is to be fixed, and not the test.
All right, so as we implemented this, there were a couple of things that we did. One is like, yeah, of course, like the slash command in the PR, it, we call that the CI mode. And we also had a plot skill written exactly the same thing, but a little more to it, because since the plot skills are invoked on demand locally, basically the local mode. So it, since we invoke it locally, we have more control over it, right. So we actually let, let it actually give it more context. And we also see like, yeah, even the browser debugging is, it's visible, and all of that. And also in terms of interactively fixing it, the developers can actually see what is actually going on. And yeah, and fix it. So certain
things can be relaxed here, for instance, like, yeah, so basically, like, if, if we want, we need not be strict about just fix only within the playwright folder, right? Like here, maybe like, if, if it classifies it as a code issue, or a back end issue or a bug, then we can even go further and say, Hey, can you fix it, and we can relax the condition, actually, here, that condition is relaxed, wherein, like, it need not just a constraint to just playwright folder, it could also look into the application code and fix it in that case, in the sense, like, for application issues, or application code issue, like, even the application code can be fixed. So, yeah, so basically, all that I'm trying to say is like,
the difference between CI mode and local mode is like, local mode has a bit more relaxed rules, because we have much more control over what we the changes that we pick from what the cloud agent suggests, and we can, since it's more interactive, unlike in CI mode, where it's all autonomous, we can have more control over it, and we can take it forward in the direction how we want it to go.
So that's the main difference. Yep, so this had been, I mean, this is out, like, in the client place that I work, like, we did implement it, and it had been useful, as you see, like, the impact is like, we hardly spend, like, five or 10 minutes looking at, so now, what we look at is not the replicating the issue and debugging the logs, and so on. All that we see is the Rukas analysis report, or the fixed PR comment, and the PR comment that's there. And that's what we need to just validate and take it forward. Yeah, we can make it completely autonomous, in the sense, yeah, I've heard places where, like, self-healing workflow, in the sense, like, where no human intervention is needed at all, wherein, like,
it would just fix it and check it in, and just keep, without validating it, we can just move on. So, but then, for me, I think, like, we still need a human in the loop, just to ensure that we are approving the right fix to move forward. Yep, so I think that's pretty much it. So the key takeaways are, yeah, MCPs, and the main MCP that we use here is Playwright Test MCP, and guardrails are super important when we build AI agents, and any agent for that case. Like, in our case, like, we need to restrict it to be, to do minimal fixes, and, yeah, guide, all of these guidelines, or guardrails should be part of the prompt file that we can serve as input to the AI agent. And, yeah, so that's pretty much it. Any questions?
All right, thank you. Thanks a lot. And, yeah, have a good day.
Transcribed automatically; names checked against the speaker record. Select a time to jump there.
Article based on this talk
An AI agent can heal your Playwright tests, but only with guardrails
Ramya Authappan shows how a single PR comment sends an AI agent to reproduce, classify and fix failing end-to-end tests, and why it must never touch the application code in CI.
In short
Ramya Authappan, a QE architect and independent consultant, argues that failing end-to-end tests no longer need hours of manual debugging. In a workflow she built for a client, one pull request comment triggers an AI agent, powered by Claude Agent SDK and Playwright Test MCP, that reproduces the failure, classifies its cause and either commits a minimal test fix or reports the root cause to humans. The catch, she stresses, is guardrails: in CI the agent fixes tests, not application code, and a human still approves the result.
Key takeaways
How Playwright Test Healer integrates with Claude Agent SDK and MCP for AI-powered test context
How a single slash command triggers autonomous debugging and fixes using AI agents
A seamless GitHub Actions workflow for automated test healing and intelligent failure analysis
Quantitative results: reduced MTTR, increased test stability and reclaimed developer hours
Why failing end-to-end tests are so expensive
Authappan opens with a scene most engineering teams will recognise. An end-to-end test fails on a pull request, developers spend hours reading logs, and the quality engineering team gets pinged to investigate. The cause could be a code change, a changed selector, a flaky test or a genuine change where the test itself needs updating. Working out which one usually means reading stack traces, checking recent changes and replaying the failure locally.
"So, yeah, approximately it could take anywhere around like two to four hours per failure, right?" (2:53)
Her question is simple: what if a tool could diagnose and fix those failures itself?
From a slash command to an autonomous brain
The developer experience she designed is a single PR comment: `/fix-playwright-test` followed by the failing test file. That comment triggers a GitHub Action, which calls a healer pipeline in the CI server through its API. In her client's setup the CI server was Buildkite, but she notes it could just as well be GitHub or Jenkins, and offers the design as a template for any CI server.
Inside that pipeline sits a framework built on Claude Agent SDK. It takes a prompt file as input, holding all the rules for debugging, analysis and fixing, and returns its analysis as output.
"So yeah, so imagine that inside the CI server, we have an autonomous AI brain." (6:58)
The agent debugs, fixes and verifies the fix, and only commits automatically when the failure is one it is allowed to fix.
Why the agent needs Playwright Test MCP
Authappan addresses an obvious objection: why not just paste the stack trace into a chatbot? That gives some reasoning, she says, but it is not how engineers actually debug. People reproduce the failure, watch the browser run the test and see where it breaks. She wanted the agent to do the same, which is why it uses MCP servers.
The main one is Playwright Test MCP, which exposes three tools: test_run, test_debug and test_list. The agent spins up a browser, runs the test, collects the failure artifacts and then uses test_debug for interactive DOM inspection to narrow down the root cause. The Chrome DevTools MCP handles wider browser interactions. She flags a common confusion:
"And yeah, another thing that you need to keep in mind this, this is not Playwright MCP, this is Playwright test MCP, there are two different MCPs." (12:15)
Playwright MCP is meant for browser automation; only Playwright Test MCP exposes the testing tools.
Guardrails: fix the test, not the application
The most important design decision, in Authappan's view, is deciding what the agent may change.
"Should it fix the code so that the test passes? Or should it fix the tests so that the code is, is verified, right?" (7:54)
Her team has seen agents edit application code just to make a test pass, so in CI the agent may only edit the Playwright folder. Further rules in the prompt file: apply only the minimal fix, make only stack-trace guided changes, avoid unnecessary refactoring and never add extra timeouts as a band-aid for flaky tests. Without that focus, she notes, the agent starts suggesting other optimisations. The agent runs as a non-root user, and a maximum iteration limit (50 in her setup, though she says the right number depends on the codebase) stops the loop and hands the problem to a human.
Classify the failure before fixing it
Root cause analysis is the layer that makes the workflow trustworthy. Selector mismatches, text or label changes and visibility or state issues are good candidates for auto-fixing. Backend bugs are not. Feeding the agent test logs, application logs and browser console logs alongside the code context lets it link, for example, a 500 error in the logs to the failing test. Test environment problems such as stale mocks or test data, or a feature flag configuration that needs updating, are reported too.
"So yeah, when it is an actual application error or a bug, it does not try to fix it. It would just report back with all the analysis and calls for human intervention." (18:50)
CI mode, local mode and keeping a human in the loop
Authappan also built a Claude skill version for local use. Because developers can watch the browser debugging and choose which suggestions to accept, the rules are relaxed there: the agent may look beyond the Playwright folder and fix application code when it classifies a failure as an application issue.
At her client, she says, the team now spends around five or ten minutes reviewing a root cause report or a fix comment instead of reproducing failures and digging through logs. She knows of teams that run fully autonomous self-healing with no review, but prefers otherwise.
"So, but then, for me, I think, like, we still need a human in the loop, just to ensure that we are approving the right fix to move forward." (25:19)
Watch the talk
Self Healing Playwright Test Workflow using Github Actions and Claude Agent SDK, by Ramya Authappan (27 minutes): https://www.womentech.net/video/self-healing-playwright-test-workflow-using-github-actions-and-claude-agent-sdk
About the speaker
Ramya Authappan is a QE Architect and Independent Consultant based in Chennai, India, with more than 15 years of experience transforming quality engineering practices at companies including Juniper Networks, Amazon, Freshworks and GitLab. Beyond her technical work, she was Director of Women Who Code Chennai from 2018 to 2024, mentoring speakers and creating pathways for women to advance in technology careers.
Questions this talk answers
Why isn't pasting a stack trace into a chatbot enough to fix a failing Playwright test?
Should a self-healing agent change the application code or the test?
What guardrails keep a test-healing AI agent safe?
What is the difference between Playwright MCP and Playwright Test MCP?
How does running the healer locally differ from running it in CI?
Drafted with AI from the talk transcript. Editor review pending.
Frameworks and ideas mentioned
Model Context Protocol (MCP)
Human in the loop
Root cause analysis
Page objects
Resources mentioned
Playwright Test MCP
Claude Agent SDK
Chrome DevTools MCP
GitHub Actions
Claude skills
Cite this talk
Ramya Authappan. "Self Healing Playwright Test Workflow using Github Actions and Claude Agent SDK." WomenTech Network, 2026. https://www.womentech.net/en-es/video/self-healing-playwright-test-workflow-using-github-actions-and-claude-agent-sdk