Key takeaways
- Every automation we run overnight starts the same way: a wrapper script hands a long written prompt to an AI program. On October 17 we measured what each wrapper was actually handing over.
- The shell wrapped the prompt in quotes without escaping the quotes already inside it, so the prompt arrived split into pieces at every quoted phrase. One arrived as 243 pieces.
- The program took the first piece, ignored the rest, and exited clean. Measured that day, our runners were delivering between 2 percent and 33 percent of their instructions, and every one reported success.
- The fix on October 18 moved the prompt off the command line and onto standard input for all nineteen runners, where there are no quoting rules to get wrong.
- The cheap test is to count the pieces that arrive. If the answer is more than one, the job has been running on a fragment.
Picture a front desk script, three pages long, and a new hire who was only ever handed page one. They greet every caller warmly and then stop, because that is where their copy ends, and nobody complains. We are a GHL consultant in the Bay Area and we run our own business on a fleet of overnight automations, and on October 17 we found out most of them had been reading page one for weeks.
How a nightly job starts
Each automation is a scheduled task. At its hour, a wrapper script reads a prompt file, a few thousand words of instructions, and launches the AI program with that prompt as an argument. The program runs, writes its output, and exits with a code. Zero means success, and that code is what the scheduler, the health check and our dashboard all read first.
The prompts are full of quotation marks, because they quote file names and exact lines to write. That detail turned out to be the whole story.
What the measurement showed
On October 17, chasing a different problem, we pointed one runner at a tiny program that only prints how many arguments it received. A prompt should arrive as one argument. The site preview runner's prompt arrived as 243. The social account's nightly build arrived as 84.
The cause sits in the shell the scheduler uses. When it passes a value to a native program, it wraps the value in quotes, but it does not escape the quotes already inside it. The receiving side reads up to the next quote and treats every space after that as a boundary, so a single prompt becomes a list of fragments.
The AI program takes the first fragment as its prompt, ignores everything after it, and exits zero. A one line test proved it: a prompt reading alpha, then the quoted phrase bravo charlie, then delta echo, came back answered as alpha bravo. Nothing complained.
Two percent of the instructions, one hundred percent of the green lights
We then measured every runner. The share of its prompt each one actually delivered ran from 33 percent at the top down to 6 percent for the job that picks the morning's video ideas and 2 percent for the job that verifies deliveries went out. The nightly builds sat between 14 and 25 percent. Every one of them had been logging success.
Read that against what we had seen in the weeks before: builds that stopped partway, and jobs that "forgot" a rule written plainly in their instructions. We had treated each one as the AI being unreliable and patched the prompts. The prompts were fine. Nothing had read them past the first broken quote.
The one loud failure was the site preview job, whose first fragment began with a dash. The program read it as an option it did not recognise and refused to start, every morning from October 9 to October 17, and that unknown option error is what led us to look. The quiet failures never gave us a reason to.
The fix
The command line was the problem, so the prompt came off it. Since October 18 every wrapper pipes the prompt into the program through standard input. There are no quoting rules on that path; what goes in is what arrives, plus one trailing line break. Two encoding settings had to go with it, because the pipe otherwise turned every accented character into a question mark and led the prompt with an invisible marker byte. The helper that does both is one file, and all nineteen runners share it.
One knock on nearly shipped. A catch up checker we run finds a lane's live process by looking for a phrase of its prompt on the command line, so it knows not to start a second copy. With the prompt gone from the command line, that phrase was gone too, and the checker would have happily restarted a build that was still running. It now looks for a display name the wrapper attaches instead.
The honest lesson
A job can run, report success, and still have done a fraction of what you asked. Our exit codes were true: the program started, did something, and finished. What they never said was how much of the instruction it received. We had a success signal for the launch and nothing at all for the content, and for weeks we read the first as the second.
The test that would have caught it costs one line and one minute. Count what arrives.
What this means for Bay Area businesses working with a GHL consultant
You have hand offs like this everywhere, and the shape is always the same: a full set of instructions on one side, a confident "done" on the other, and nobody checking what made it across.
- When an automation "forgets" a rule, check what it was given before you rewrite the rule. The instruction may be right and the delivery wrong.
- A green status tells you a thing ran. Ask separately whether it ran on the whole job.
- Test the hand off with something you can count, like a known phrase near the end. If the end never shows up, the middle is missing too.
- Before you change how one system talks to another, find everything else that was listening to the old way.
If a GHL consultant in the Bay Area tells you an automation is running, ask the follow up: how much of its instructions does it actually get? Ours were getting a quarter, and nothing in the system knew.
Want to build this yourself?
Join the On Point Tech Academy at optechsol.llc/academy. It's free, and we build live every Tuesday and Thursday.
The On Point Tech Academy costs nothing and never asks for a card. We build live every Tuesday and Thursday, 12:30 to 1:30 PT.
Join the Academy free ← Back to all Field Notes