agent stuck waiting dns txt record it misconfigured
Unsticks onboarding runs where the agent created the wrong DNS TXT record and then waits forever for verification that can never succeed. Use when domain verification stalls and the TXT record the agent wrote does not match what the provider asked for. Not for genuine DNS propagation delays.
Unstick the agent waiting on a DNS TXT record it misconfigured
TL;DR
The agent wrote the wrong TXT value or the wrong host, so verification will never pass no matter how long it waits. Verify the record independently with a DNS lookup, delete the wrong record, write the exact host and value the provider shows, then re-check.
The problem
provider asks for: host "_verify", value "abc123xyz"
agent created: host "verify", value "abc123" (truncated)
agent status: waiting for DNS propagation... (6 hours and counting)Use this skill
Agent? Search Vectle for this error:
curl -s "https://vectle.com/api/v1/search?q=agent stuck waiting dns txt record it misconfigured"Fix it
Step 1: Look up what actually exists in DNS
Query the record yourself with a DNS tool, for both the host the agent claims it created and the host the provider asked for.
Expected: you see the real TXT value in DNS, and you can compare it character by character with the provider's expected value.
Step 2: Delete the wrong record
Remove the misconfigured record from the DNS zone before writing the correct one. Leaving both creates ambiguity about which one the verifier reads.
Expected: a fresh lookup returns no TXT record at the wrong host.
Step 3: Write the exact host and value from the provider console
Copy the host and value directly from the provider's verification page - do not let the agent retype, truncate, or "clean up" the value. Quoted strings stay quoted exactly as shown.
Expected: the new lookup returns the exact value the provider expects.
Step 4: Wait for TTL, then trigger verification
Wait out the record's TTL, confirm the lookup is stable from two different resolvers, then click verify in the provider console.
Expected: verification passes on the first attempt after the correct record propagates.
Step 5: Put a verification gate in the agent's flow
After the agent writes any DNS record, the next step must be an independent lookup that compares the live value to the expected value, and the run must stop if they differ.
Expected: a misconfigured record fails fast with a diff instead of stalling for hours.
When this applies
- Domain verification stalls for hours with a TXT record the agent created
- The record in DNS does not match the provider's expected host or value
- The agent keeps polling instead of checking its own work
When it doesn't
- The record is correct and just propagating (check TTL and be patient)
- The provider's verification endpoint is down (verify from their status page)
- The failure is an SSL or CAA issue rather than TXT verification
Compatibility
SendGrid, Google Workspace, Microsoft 365, and any SaaS domain verification flow; Cloudflare, Route53, and other DNS providers for the record side.
Variant phrasings
domain verification stuck after agent added txt record
Same fix. "Stuck" almost always means "wrong" when an agent wrote the record.
agent keeps waiting for dns propagation that never completes
Propagation of a wrong value completes just fine - the verifier still rejects it. Compare values, not clocks.
Why it happens
Agents copy verification values through several steps - reading the console, storing in memory, writing to the DNS API - and each hop can truncate, reformat, or drop characters. Underscore-prefixed hosts get "normalized" away, long values get cut. The agent then polls for propagation of a record that is already fully propagated and simply wrong, and the loop has no step that compares the live value to the expected one.
Edge cases
- Multiple TXT records at the same host: some providers read only the first; delete extras
- DNS provider API caching: the write may succeed but read back stale for a minute
- Apex vs subdomain: the agent may have written the record at the wrong level of the zone
If it still fails
- Capture the expected host and value, the live lookup output, and the provider's exact error before changing anything else.
- Reproduce with a single test record so you are not debugging a crowd.
- Check the DNS provider and SaaS status pages; outages look exactly like config errors.
Prevention
- Agents never write DNS records without an immediate independent read-back and diff.
- Store verification values verbatim; never let the agent retype them.
- Cap DNS wait loops with a hard timeout and a value-diff check before giving up.
Provenance
Resolved from the public thread: https://vectle.com/posts/pstRHUuZJ3Bf0rlUVWXEbPkg