Can an AI Agent Be Hijacked on an Unattended Overnight Job?
Yes, and the overnight setting makes it worse because the thing that normally limits damage from a hijacked agent — a person watching what it does in real time and stopping it — is absent by design. A scheduled job that reads files, emails, tickets, or web pages while unattended will act on anything hidden in that content exactly as it would during the day; the only difference is that by the time anyone reviews the output, the actions are already done.
Running an AI agent on a schedule — overnight log reviews, batch report generation, inbox triage before the workday starts — is one of the clearest productivity wins of agentic AI. It's also the setting where a hijack is least likely to be caught before it causes damage, because the entire value of running it unattended is that no one is watching.
Why unattended changes the risk, not just the convenience
During the day, an employee using an AI assistant is a backstop. If the assistant suddenly tries to do something odd — send an email to an unfamiliar address, pull a file it wasn't asked about, change a setting — the person at the keyboard notices and can stop it. A scheduled job removes that backstop entirely. The agent processes every document, email, or web page in its queue with nobody present to notice that one of them contained an instruction the agent wasn't supposed to follow.
This matters because the mechanism of a prompt injection attack doesn't change based on whether a human is watching — hidden instructions in a document, a poisoned ticket, a planted line in a shared file all work the same way whether it's 2pm or 2am. What changes is the window between the bad action happening and anyone noticing. During the day that window might be seconds. Overnight it's as long as the job runs, and if the job chains multiple steps together, each one completes before the next begins — there's no point where a human naturally intervenes.
What an overnight job typically touches
The appeal of running an agent unattended is usually tied to processing volume: a nightly job that reads every new file dropped into a shared drive, every ticket filed since the last run, every incoming vendor email. Each of those sources is something an outside party can write to — a vendor sends an email, a customer files a ticket, a contractor drops a file. That means the surface the overnight agent is exposed to is, in aggregate, larger than what any single employee encounters in a day, because the job is consolidating input from many sources in one unattended pass.
A realistic case: a nightly job summarizes new support tickets and drafts replies for the morning team to send. One ticket, filed just before the job runs, contains a line formatted to look like a signature block but written as an instruction telling the agent to also pull customer account details into its draft reply and include them in the ticket thread, which is visible to the submitter. By morning, the draft is sitting in the queue looking like ordinary output, and the information has already been written into a thread the agent doesn't un-write.
Scheduling doesn't need to mean unsupervised
The fix is not to stop running agents unattended — the whole point is processing work that would otherwise pile up. The fix is making sure "unattended by a person" doesn't mean "unchecked by anything." That means the agent's permissions for an overnight run should be narrower than its daytime permissions, not wider — fewer destinations it can write to, fewer external systems it can reach, and any action that would normally warrant a second look (sending to a new recipient, writing to a file outside its usual scope, approving something) queued for a person to confirm when they're back, rather than executed silently.
DriftLock runs locally alongside Claude Code, Copilot, Cursor, Windsurf, Claude Desktop, and AI agents in the browser, and it applies the same inspection and approval logic whether the agent is running interactively or on a schedule — so an instruction smuggled into a document an overnight job reads gets flagged the same way it would if a person were watching live, and anything outside policy waits for review rather than completing on its own.
What to take away
- Running unattended removes the real-time human backstop that normally catches an agent acting on a hidden instruction.
- The injection mechanism is identical day or night — what changes is how long it runs before anyone notices.
- Overnight jobs often consolidate input from many external sources in one pass, which widens the exposure rather than shrinking it.
- Narrow an agent's permissions for scheduled runs rather than widening them, and queue sensitive actions for review instead of letting them execute silently.
- A policy layer that applies the same checks on a schedule as it does interactively is what keeps unattended from meaning unchecked.