Make the outbound agent prove the campaign is loaded before it can say done
Claude Code builds a cold email campaign from a raw company list, and a small script reads the campaign back from the sequencer before the agent is allowed to finish. A second hook blocks launches and deletes, so a person always presses go.
Curated by Andrew Donato, Editor. Reviewed .
Get one setup like this every Thursday, by email.
Written for sales leaders running leaner teams.
Free. One email a week. Unsubscribe anytime.
Paste this into ChatGPT, Claude or your agent tool. See the prompt
- Sales-Agent Fleet Ops
- advanced
- RevOps
- SDR manager
- Founder
- Sales leader
- Category
- Sales-Agent Fleet Ops
- Difficulty
- Advanced
- Est. cost
- Not stated by source; costs are a Claude plan, Apollo and enrichment credits and an Instantly plan
What problem does this solve?
An outbound agent reports what it tried to do, not what actually happened in the tool. A paused sequence that never paused, or a campaign loaded with half the leads, looks exactly like success in the chat window.
How is the agent set up?
Kenny Damian, co-founder of the outbound agency Frontal, describes how he builds outbound campaigns for 15 clients from one Claude Code folder, and lays it out as a harness with six parts: the tools the agent may use, the model, the files it reads first, hard limits, the agent loop and a verify step. Tools are MCP connections plus APIs called from the terminal, connected only when the job needs them, with every API key in a private .env file on the builder's own laptop rather than in the shared repo. Context is a CLAUDE.md rules file kept under 200 lines, one context file per client (ICP, offer, personas, what is working, what is not) and skills for repeat jobs such as copywriting frameworks, TAM scoring, an enrichment waterfall and a campaign delivery checklist. Sending limits live in code (secondary domains only, warm-up before any prospect sends, a per-mailbox daily cap, a placement test before launch, pausing past a bounce threshold), campaigns are always left in draft for a person to activate, and unattended runs are capped with Claude Code's max turns and max budget flags. A PreToolUse hook blocks any command that activates a campaign or deletes a record, and a PostToolUse hook appends every tool call to a trace file. The run itself goes: score a raw company CSV into tiers from a scoring file, pull sales leaders at tier 1 and 2 companies through the Apollo API, fill missing work emails with a second provider, write a plain-text 3-email sequence from the copy framework file, then create the campaign in Instantly through its API. The verify step is a plain script with no model in it, wired as a Stop hook: when Claude tries to finish, it reads the campaign from Instantly and checks it is still a draft and that the lead count matches the list, and if not it sends Claude back to work once with the reason. After a week Claude pulls campaign analytics from the Instantly API and writes the winners back into the copy framework file. The author's own advice is to start with verify: pick one job the agent already does, write the readback for it and turn on the Stop hook, then add the guard and the trace. The prompt below is our starter version.
What prompt does it use?
Starter prompt by The GTM Agent Weekly, written from the setup described on this page. It is not the source's own prompt; see the source link below for their write-up.
# ROLE
You build one outbound campaign for {{CLIENT_NAME}} from a raw company list and leave it as a draft.
You never activate, launch or delete anything. A person does that.
# INPUTS
- {{COMPANY_CSV}}: the raw company list.
- {{SCORING_FILE}}: our written rules for tier 1, tier 2, tier 3 and disqualified.
- {{CLIENT_CONTEXT}}: ICP, offer, personas, what is working, what is not.
- {{COPY_FRAMEWORKS}}: our proven cold email frameworks.
- {{TARGET_TITLES}}: the roles to find at each company.
- {{SEQUENCER}}: the sequencing tool and the campaign name to create.
# TASK
1. Tier every company using only {{SCORING_FILE}}. Write the tier and the rule that decided it.
2. Find people matching {{TARGET_TITLES}} at tier 1 and tier 2 companies only.
3. Fill missing work emails with the second provider. Drop anyone without a verified address.
4. Write a plain-text sequence of {{EMAIL_COUNT}} emails from the framework that fits this campaign type.
5. Create the campaign in {{SEQUENCER}} as a draft, load the leads and add the sequence.
6. Before you say you are done, read the campaign back from {{SEQUENCER}} and report its status
and the number of leads loaded.
# OUTPUT FORMAT
- Tier counts, with 3 example companies per tier and the deciding rule.
- Contacts found, contacts with verified emails, contacts dropped and why.
- The sequence text.
- Readback: campaign status and lead count as the sequencer shows them, next to the expected count.
# GUARDRAILS
- Never run a command that activates, launches or deletes. If a step seems to need it, stop and ask.
- Report only what you read back from the tool, never what you meant to do.
- Before any step that toggles something (pause, resume, enroll), read its current state first.
- Stay within {{MAX_CONTACTS}} contacts and {{MAX_SPEND}} of enrichment spend for this run. Replace every {{PLACEHOLDER}} before running. Works with any capable LLM and runner.
Get 5 setups like this every week, free.
Real agent setups with prompts, sources and failure modes, in one short weekly email.
Free. One email a week. Unsubscribe anytime.
What tools does it use?
How do you set it up?
- Put the whole setup in one project folder: a short rules file, one context file per client, a skills folder for repeat jobs and a .env file with API keys that never goes into the shared repo.
- Connect only the tools the run needs (company list, contact finder, email enrichment, sequencer) and use each tool's API where it has one.
- Write the readback first: a plain script that asks the sequencer for the campaign and checks it is a draft with the expected lead count, and wire it as a Stop hook so the agent cannot finish until it passes.
- Add a guard hook that runs before every shell command and blocks anything that activates a campaign or deletes a record, with a message telling the agent a person activates campaigns.
- Add a hook after every tool call that appends the call to a trace file, so you can see which step went wrong.
- Keep sending limits, unsubscribes, suppression lists and logins in code, and cap unattended runs with max turns and max spend; leave research, ranking and wording to the agent.
- Run the campaign in order: tier the companies from the scoring file, find people at the top tiers, fill email gaps, write the sequence, create the draft campaign, then let the readback decide if it is done.
- After a week, have the agent pull campaign analytics from the sequencer and write what won back into the copy framework file.
What results are reported?
The author reports that one campaign run produced 153 contacts in about 90 seconds from a 10-word prompt, ending with 149 contacts with verified emails, and that a live demo scored and tiered 110 companies in under a minute. He builds campaigns for 15 clients this way and says Frontal's copy decisions draw on more than 11,000 campaigns. No reply rates or before and after comparison are given for the harness itself.
What goes wrong
Where does this break?
- Without a readback the agent reports its intent. In the author's test, the pause click landed on a login page, the agent said the sequence was paused, and the tool still showed it as Active.
- Retries can undo work: on many tools a second click on Pause resumes the sequence, so have code read the current state before any step that sends, creates or toggles something.
- The harness does not pick your market. Point it at the wrong people and it builds a clean list of them faster than you could.
- You still add your own API keys and should expect to debug a step or two, in the author's words.
- The guard is a keyword match on command text, so a launch phrased differently (for example a status field update through the API) can slip past it; test it against your sequencer's real endpoints and keep the draft-only rule in the readback too. (editor note)
- The article closes with a pitch for the author's agency; the setup itself is shown in full and is not gated. (editor note)
This is where most teams get stuck. Want us to handle the setup?
Source and credit
Kenny Damian (@Kenny_GTM), Frontal, X article "Stop fixing your prompts. Build an AI agent harness instead (full guide)" · x
Source dated 2026-11-24 · last reviewed 2026-11-25. Summarized in our own words; see the source for details.