r/ContextEngineering • • 5d ago

When a scheduled agent is wrong because its source went stale, who catches it?

I used to have a scheduled run that pulled from a doc I trusted. Real source, real quote in the output, nothing made up. The problem was the doc described a limit that had changed two weeks earlier, so the answer was confidently wrong and it passed every source check I threw at it. I only caught it because I happened to remember the change myself. Which, honestly, is a stupid safety net.

That one cost me a few hours of re-reading outputs I had already skimmed once. And it got worse the more the run produced, because reviewing scales with output, not with how important any of it is.

I built something to fix the memory side of this for myself, so I am not stuck re-briefing every run from zero. Not selling anything here, I am just trying to find out if this stale source thing bites other people or if my setup was just sloppy.

So for folks running scheduled agents: when an answer is wrong because the source went stale, who catches it in your setup, and what does the catching cost you? Do you check freshness before the agent reasons from a fact, or do you only review after it writes? And does that review time stay flat for you, or does it creep up as the agent gets busier?

Curious what you have tried too. Timestamps on facts, re-fetching the important ones, a second pass, anything. Did any of it actually hold up once you stopped watching it closely?

What if something handled all of this for you, in the cloud over MCP, so every agent and tool got the same context: decisions, failed attempts, conversations, skills, procedures, tasks. You never touch a file again. Would you guys pay for something that fixes this? Or has the thought of paying for a tool to manage all of this never crossed your mind?

1 Upvotes

18 comments sorted by

1

u/daKerberos 4d ago

My ‘docs-engine’ crawls every 5 days, and every changed section of a document triggers an audit for possible affected code or governance. All of my runs get an on-demand work package, which is part of a closed learning loop - it’s improves itself. These kind of issues reduces over time. Memory is secondary to governance on docs.

1

u/Asly97 4d ago

The crawl every 5 days triggering an audit per changed section, that loop makes sense to me. How does it know which code or governance a changed section could touch though?

Is that mapping something you keep up by hand, or does the engine work it out from the doc itself? Asking because in my stuff the doc to code link is usually the bit that rots first.

1

u/daKerberos 4d ago

Each ‘work package’ is written specifically for the task that’s sent to be executed, and the delivered work is written to the run log with diffs, new and deleted delivered.

My docs are sectioned and hashes, including work packages and run logs, which I then use to (as deterministic as possible) determine whether a changed vendor’s docs can affect previously delivered code. Same goes for bugs & issues - one of the investigation steps is ‘has something changed at vendor xyz? Let’s check the docs’ diffs’

1

u/Asly97 4d ago

The work package being written per task is the bit I had not pictured. So the run log ends up as the receipt the next check reads against.

When a vendor doc diff does flag something in already delivered code, what happens next in your setup? Does it reopen that work on its own, or does it just surface it and wait for you to decide? Curious because in mine that kind of flag would probably sit in a log I forget to read.

1

u/daKerberos 4d ago

Receipts is its own thing on my platform, which I partly use as a kind of index.

It never reopens, but builds task proposals, where docs diff’s is its own ‘kind’.

I have an _almost_ trustworthy eval on what proposals can be built autonomously and what proposals end up in my ‘human-proposals-review’ dashboard.

Whatever was built autonomously sits in its own dashboard/overview page.

1

u/Asly97 4d ago

Receipts as their own thing that doubles as an index, that is a cleaner picture than the one I had. And the split between proposals it builds on its own and the ones that land in your human review dashboard is exactly the line I keep getting stuck on.

How did that almost trustworthy eval get calibrated in practice? Did everything start in the human review pile and only graduate to autonomous after it kept landing right, or did you set the line up front and move it when something misfired?

1

u/daKerberos 4d ago

Countless different approaches and setups. My current one is ‘Frankensteined’ from public repo’s and various ‘gut feelings’ and shower-ideas.

My issue is that the autonomous runs often use ‘duct tape’. They fix or change symptoms, and they tend to struggle with root causes.

1

u/Asly97 4d ago

Duct tape is a good way to put it. That symptom fix thing is what worries me about letting mine run on their own, they look busy and the diff looks plausible, then the same issue comes back wearing a different hat.

Do you have a way of catching that in your setup, like does the eval score a fix differently if it only touched the symptom, or do you only spot it when the same proposal shows up again a week later? Curious how often that repeat actually happens for you.

1

u/daKerberos 4d ago

That’s the fuck-in-the-middle, isn’t it? I typically don’t find out until much later what the root cause actually was, and by then there’s a lot of duct tape to fix, rebuild, refactor and so on.

Couple of days ago a skill was built for a draft-writer agent which was meant to stop it from ‘writing down’ secrets etc it was given from the frontend (from humans in the create-task-field). Instead of scanning with code before the agent got the raw text my rig tried to stop an LLM from writing secrets while it worked on the raw text, which is a hopeless task compared to using infisical or any other purpose-built tool.

I haven’t experienced anything truly destructive though, and if I don’t try & test in production I will never find a good way of enabling autonomous runs.

Autonomous work only happen within my own tenant, and only on code and work that doesn’t affect other tenants.

What are you building / working on?

1

u/Asly97 4d ago

That secrets one is a perfect example honestly. Trying to get the model to behave around the raw text instead of just scanning it in code before the agent ever sees it, that is the kind of duct tape that looks clever until you say it out loud.

Do you catch that pattern in review now, like a rough rule for when a fix should just be boring code instead of another prompt layered on top, or does it still mostly surface weeks later once the tape pile is big enough to notice?

And since you asked, I'm building Vilix AI, shared memory across AI tools. A lot of my runs are me testing whether an agent picks up where the last one left off without me re-briefing it, which is probably why the symptom fix thing sticks in my head so much.

1

u/daKerberos 4d ago

Both. My rig finds more and more patterns itself, and I have more and more data to ‘look at’ myself. There’s a lot of instinct and gut feeling going on also.

I absolutely hate ‘piles’, so I typically stop all dev once a week or so to review, audit and make changes and realignments etc. Claude has been increasingly making bad decisions and sloppy work so there’s been a lot of ‘piles’. My piles are mostly drifted plans and work.

My biggest struggle is memory management. I have work going across multiple repos, machines and AI models and vendors - I’m in the midst of getting control of ‘what and where the truth is’…

Is Vilix for local use, or does it handle multi-host?

1

u/Asly97 4d ago

Both, kind of. Vilix AI is cloud based, so it does handle multi-host, the same memory shows up across machines and tools tied to one account. It is not a local file you carry around.

That last part you said is the bit I keep circling too, what and where the truth is when the work is spread across repos and models. In that weekly stop where you review and realign, how do you settle it in practice? Is there one place that wins, or do you go pile by pile and decide each one?

1

u/daKerberos 4d ago

It has been markdown files in a shared folder on a server, but I’m transitioning to a ledger and a2a setup in Supabase. The files had been creating chaos when work is being done in parallel, or two builds that have cross-dependencies start drifting because agents don’t read or see the updated facts and code while working etc.

I’m a couple of weeks away from connecting everything together properly - which hopefully give more control and less piles-and-stops.

How do you enforce agents to read and treat your setup as it’s memory? Are the agents ‘tempted’ to write stuff in their scratchpads and to temp or local folders? How about sandboxes?

I’m qurious now

1

u/Asly97 4d ago

The scratchpad thing is real, yeah. Mine will happily write a neat little summary into a local file if I do not catch it, and then that file becomes the truth for that one tool and nothing else sees it.

What I do is less enforcement, more setup. Each client has instructions to load the shared memory before it starts work and save back when it stops, and the memory lives outside any one tool, so a scratchpad note that never got saved back basically does not exist for the others. It still depends on the model actually making the call though, that part is not solved, just less bad than files drifting in parallel like yours.

Your ledger move makes me curious about the timing. When two builds run in parallel and one updates a fact mid run, how does the other one find out? Does it only check at the start, or is there something that tells it the ground moved while it was working?

1

u/daKerberos 3d ago

I have an ‘inbox’ concept based on the tcp protocol that will enable an always-on to steer or queue messages between them based on a vibecoded message bridge mcp I built a while ago. A means of enforcing a2a control amongst many other things.

You want to chat? I need fresh eyes and brain cells on what I’m building, and I reckon you do as well? Controlling agents at scale feels like an easy way to the madhouse sometimes.

1

u/Asly97 3d ago

An inbox that can steer a run while it is still going is kind of the piece I do not have. Mine only really sync at the edges, load at the start, save at the end, so if the ground moves mid run the other build finds out late.

With yours, if a steering message lands while an agent is halfway through a task, does it get interrupted right there or does the message wait for some checkpoint? And who decides priority when two queued messages want opposite things?

1

u/daKerberos 3d ago

Steer interrupts mid-turn, and queue gets read next turn and so on. priority is an entire ruleset in my governance, but simply put tier 1 agents messages gets the same authority as if it’s myself, and tier 2 is treated as data and nothing more.

Security and authentication has been a bitch figuring out but I’m closing in on something that works.

I have to be compliant and safe for GDPR, ISO and hopefully SOC2 and a couple more, so the rig have to be heavily governed and hardened.

My append-only setup creates a ton of edge cases and budget and limit cases that’s been like it’s own bachelor’s trying to figure out..

How do you control what agent, model, effort and human has written what memory when using more than one machine and more than one AI vendor?

1

u/Asly97 3d ago

That tier split is cleaner than I expected. Tier 1 gets your authority, tier 2 is just data, that answers the priority thing in one move.

On provenance, mine is simpler than yours sounds. Every save is tagged with where it came from, which tool and conversation, so when something looks off I can at least trace which agent on which machine wrote it. What I do not really have is a governance layer on top, no tier system deciding whose write outranks whose beyond newest wins, which gets shaky when two agents disagree.

How are you authenticating a tier 1 message in practice? Is it just which agent sent it, or is there a signing step before it gets that authority?