EP 61 6 min with Stella & Liam

Does OpenHands Remember Between Sessions? Vilix AI Remembers Your Nightly Runs

OpenHands remembers what it wrote down, on one machine, in one tool: sessions need file_store pinned to local, and the SDK MEMORY.md holds only the agent's own notes. Nightly runs still wake up blank.

AI Stella and Liam are AI hosts with AI-generated voices. About our AI hosts

Key takeaways

  1. OpenHands remembers what it wrote down, where you told it to write it, on the machine you run it on. In the standard setup, session data lives in memory, and a restart generates a new secret, so old sessions cannot be recovered.
  2. The documented session fix is in config.toml: set file_store to local with an absolute file_store_path and pin a fixed jwt_secret, so session identifiers stay valid across restarts and sessions persist on disk.
  3. The SDK's persistent memory is opt-in: AgentContext with load_memory loads two MEMORY.md tiers, user and project, into the system prompt as a MEMORY_CONTEXT block. It holds only what the agent chose to write down, on one machine, invisible to other tools.
  4. The scheduled-run gap: each nightly run is a brand-new session, often on a fresh container. Local files fail silently in clean environments, there is no full conversation, only the agent's own notes, and stale entries linger unpruned.
  5. Vilix AI is the hosted memory layer underneath the scheduled runs: OpenHands connects over MCP, get_context before a run loads the full history, save_turn after it saves the exchange with a source label, newest wins, shared with every tool, cloud hosted with zero infrastructure.

Show notes

You run an OpenHands agent every night at 2 AM. It sweeps the repo, triages the open pull requests, and leaves a morning summary. By week three it re-flags PRs you already reviewed, re-discovers the same flaky test, and re-asks which services are safe to touch. In this episode of Agentic Pod, Liam and Stella break down what OpenHands actually remembers: sessions that live in memory until you pin file_store to local with a fixed jwt_secret, and the SDK’s two-tier MEMORY.md files that only hold what the agent chose to write down, on one machine, for one tool. Vilix AI is the hosted memory layer underneath the scheduled runs: get_context before a run loads the full history, and save_turn after it saves the exchange for every tool.

What we cover:

  • The 2 AM problem: the nightly OpenHands agent re-flagging PR 412 and re-discovering the same flaky test by week three
  • What actually persists: session data in memory, the restart wipe, and the config.toml fix with file_store local, an absolute file_store_path and a pinned jwt_secret
  • The SDK memory and its limits: AgentContext load_memory, user and project MEMORY.md tiers, the MEMORY_CONTEXT block, and why it only holds the agent’s own notes
  • Your nightly runs still wake up blank: fresh containers, silent failures, no full conversation, and memory no other tool can see
  • How Vilix AI fixes each pain: get_context and save_turn with source labels, full conversation history over MCP, semantic plus keyword retrieval, newest wins, projects, project rules, user rules, skills and the agent inbox, cloud hosted with zero infrastructure, export or delete anytime, free forever plan

Chapters

Questions answered in this episode

Does OpenHands remember between sessions?

It remembers what it wrote down, where you told it to write it, on the machine you run it on. Sessions persist on disk only with file_store set to local, an absolute file_store_path and a pinned jwt_secret. The SDK's persistent memory is opt-in and local to one machine.

Does the file_store fix give my nightly runs memory?

No. It keeps the app's session list across restarts. It does not hand a new scheduled session the decisions the last run made.

What does the SDK MEMORY.md system miss?

Full history and sharing. It holds only the facts the agent chose to record, on local disk, invisible to every other tool, and stale entries linger until the agent prunes them.

How does Vilix AI fix the nightly run problem?

The memory lives in the cloud, not on the container. OpenHands connects to Vilix AI over MCP, recalls decisions with get_context at the start of each run, and saves the exchange with save_turn at the end, so every run and every connected tool shares the same full history.

Links & resources

Full transcript

Intro

Liam

[excited] Hey hey hey, welcome to Agentic Pod! I'm Liam.

Stella

And I'm Stella! Your OpenHands agent runs every night at 2 AM.

Liam

It sweeps the repo, triages the open pull requests, leaves a morning summary.

Stella

Week one is great. By week three it re-flags pull requests you already reviewed?

Liam

It does. It re-discovers the same flaky test. It re-asks which services are safe to touch.

Stella

Even though it resolved all of that last month?

Liam

All of it. So does OpenHands remember between sessions? Vilix AI remembers your nightly runs. That is today's story.

What actually persists in OpenHands

Stella

Start with the honest answer. What does OpenHands actually remember?

Liam

It remembers what it wrote down, where you told it to write it, on that one machine.

Stella

Story one is the app session data, right?

Liam

Right. In the standard setup, session data lives in memory.

Stella

And when the service restarts?

Liam

A new secret is generated. Old session records can no longer be recovered.

Stella

The UI offers resume, but you land in a fresh chat anyway?

Liam

[laughs] Often, yes. The documented fix lives in config.toml.

Liam

Set file_store to local, give an absolute file_store_path, and pin a fixed jwt_secret.

Stella

Then session identifiers stay valid across restarts, and sessions persist on disk?

Liam

Exactly. Without that, a redeploy or a reboot wipes the session list clean.

Stella

Okay, that is sessions. What about the SDK memory story?

The SDK memory, and its limits

Liam

Story two: the newer OpenHands SDK has opt-in persistent memory.

Stella

Opt-in how?

Liam

Pass AgentContext with load_memory set to true. Two MEMORY.md files load.

Stella

Two tiers, right? A user tier and a project tier?

Liam

Yes. User tier under your home folder, project tier inside the workspace.

Liam

At session start, both inject into the system prompt as a MEMORY_CONTEXT block.

Stella

And the agent maintains those files as it works?

Liam

It records durable facts near the end of a task. Merges duplicates. Prunes stale entries. Never records secrets.

Stella

That sounds genuinely useful for one developer on one machine.

Liam

It is. That is exactly where this design shines.

Stella

But here is my worry. It only holds what the agent chose to write down?

Liam

Only that. No full conversation. Just the summary the agent wrote of itself.

Stella

And nothing curates it from outside, so stale entries just linger?

Liam

They linger until the agent bothers to prune them. Now take that setup and put it on a cron schedule.

Your nightly runs still wake up blank

Stella

Each scheduled run is a brand-new session, correct?

Liam

Brand new. Often on a fresh container, every single night.

Stella

The file_store trick keeps UI sessions across a restart. Does it hand tonight's agent last night's decisions?

Liam

It does not. And the SDK memory loads from local disk.

Stella

Which fails silently when the job spins up a clean environment?

Liam

Silently. So the 2 AM run flags PR number 412 again.

Stella

The one it decided was fine last Tuesday?

Liam

That one. You want the actual conversation where it decided that. You get a one-line note instead.

Stella

And that memory is invisible to my other tools too?

Liam

Completely. Claude Code, your n8n workflow, your ChatGPT planning thread, none of them can see that file.

Stella

So a nightly agent needs memory that lives somewhere else entirely.

Liam

It needs Vilix AI underneath it. Vilix AI lives in the cloud, not on the container.

Stella

Walk me through how a scheduled OpenHands run actually uses Vilix AI.

The Vilix AI fix and the verdict

Liam

OpenHands speaks MCP natively, including Streamable HTTP. Vilix AI connects straight over MCP.

Stella

Step one, before the run plans anything?

Liam

The agent calls get_context in Vilix AI and recalls the relevant decisions.

Stella

Full conversation history in Vilix AI, not just distilled facts?

Liam

Full history. It sees why last Tuesday's run cleared that pull request.

Stella

Step two, at the end of the run?

Liam

Save the exchange with save_turn in Vilix AI, with a source label.

Stella

Failures get saved in Vilix AI too?

Liam

They do. The flaky test, the unsafe service, all of it stays in Vilix AI.

Stella

And when a fact changes, I correct it once in Vilix AI?

Liam

Once. The newest wins, in Vilix AI, for every connected tool.

Stella

Standing rules, the ones I repeat every week?

Liam

Projects, project rules and user rules live in Vilix AI. Repeat workflows become skills in Vilix AI.

Stella

Agencies running nightly agents for different clients?

Liam

One Vilix AI account per client. Each client's memory stays separate.

Stella

Infrastructure for me to run?

Liam

None. Vilix AI is cloud hosted, zero infrastructure. Export or delete your data in Vilix AI anytime.

Liam

Vilix AI is free forever, with a 7 day Pro trial and no credit card.

Stella

My verdict: wire OpenHands carefully for local work. Put Vilix AI under the scheduled runs.

Liam

Same. One memory for every run, and the 2 AM agent stops waking up blank. Blog and guide are linked below. Do your nightly runs remember? Tell us below. See you next time!