
Enhancing Goose Load Testing with an AI-Powered Killswitch

November 26, 2025
Take Away:
At Tag1, we believe in proving AI within our own work before recommending it to clients. This post is part of our AI Applied content series, where team members share real stories of how they're using Artificial Intelligence and the insights and lessons they learn along the way. Here, Alec Smrekar (Software Engineer) shares how Claude Code helped him implement a killswitch feature in Goose, Tag1’s open-source performance and load testing tool, making automated load testing safer and more flexible.
The Problem: Controlling Goose Load Tests Safely
Our team uses Goose for internal prewarming scripts that traverse a site’s sitemap and load all pages and assets to prime caches. This script runs daily and immediately after deployments, since most Drupal and CDN cache entries are cleared during deployments.
Goose runs requests concurrently. While the --iterations option can limit a run to just one pass over all pages, we needed a killswitch to programmatically stop runs under certain conditions, such as:
- Errors exceeding defined thresholds
- Response times spiking beyond acceptable limits
- Critical failures occurring mid-run
The killswitch unlocks several practical workflows, including automatically priming caches after deployments and gracefully halting tests when issues arise, making automated load testing safer and more flexible.
Experimenting with AI to Build the Killswitch
I started by asking Claude Code general questions about Goose and its run state, just to see how much it could understand without guidance. The responses were surprisingly accurate and suggested a method to stop a test run programmatically.
The solution was close to what I expected but initially relied on Rust’s unwrap function. That works, but it can crash if something unexpected happens. I asked Claude to modify the implementation for a safer approach. During this process, it invented a non-existent error variant. Using compiler feedback, it self-corrected.
Claude also helped with repetitive parts of development:
- Drafting concise usage examples for the killswitch
- Writing initial tests
- Producing first-pass documentation
I learned that Claude works best when treated like a junior developer: it knows syntax and tools but needs clear guidance and context to produce usable results.
Iterating and Learning with AI
Some of Claude’s suggestions were close to what I would have written, but they required oversight:
unwrapexample: Technically correct but risky; I guided it toward safer error handling- Hallucinated error enum: AI doesn’t know the codebase; compiler feedback helped ground the process
- Repetitive tasks: Drafting usage examples, writing boilerplate tests, producing first-pass documentation
This iterative process, prompting, reviewing, and refining, ensured the killswitch integrated cleanly with Goose’s existing codebase.
PR for the killswitch: Goose Pull Request #634
What I Learned: AI as a Developer Partner
Claude saved significant time in a part of Goose I wasn’t as familiar with.
Key takeaways:
- Guiding the model in the right direction is crucial
- With enough context, AI can extend developer capabilities rather than compete with them
- The killswitch unlocks new Goose use cases, allowing code execution to be terminated gracefully when conditions are met
Even though this was a relatively small tweak, it enables programmatic control of Goose and improves internal prewarming workflows and broader load testing practices.
Applying These Lessons Beyond the Project
While we created this patch for an internal project, it demonstrates how AI can extend and automate developer workflows:
- Our prewarmer scripts can now be aligned with the upcoming Goose improvements.
- Similar AI-assisted approaches could streamline repetitive coding tasks in client projects. With the next stable release of Goose, our prewarmer scripts can then be fully integrated with the latest release.
I would encourage everyone to check out Goose, give it a spin, and see how it can benefit your organization.
Bring practical, proven AI adoption strategies to your organization, let's start a conversation! We'd love to hear from you.