Guides/Workflows
Run Long AI Agent Jobs Across Sessions and Subagents Without Losing Your Place
ContxOS tracks a workflow run outside the chat: position, verified facts and holds live on the run, so work survives context resets and steps can go to subagents.
Jose R. Gonzalez, CPA · Founder of ContxOS
Updated · 2 min read
In short
When an agent executes a workflow in ContxOS, it opens a run. The run records where the work stands, which facts were verified, and what is on hold and why. None of this lives only in the chat, so a new session, or a different agent, reads the run’s position and picks up at the right step. Steps that have proven reliable can be handed to subagents, each of which receives only what its step needs.
Where long jobs break
A long job, such as reconciling a year of transactions or migrating a hundred records, often outgrows a single context window. When the window fills, the agent either compacts and forgets details, or you start a new chat and try to describe where you were. Both are how steps get skipped or done twice.
The run holds the state, not the chat
- Position: which step is next, which are done, which are skipped.
- Verified facts: values the agent checked against their source, so later steps don’t re-derive them from memory.
- Holds: steps waiting on a person or an outside event, with the reason.
Resuming a session starts by reading the run’s position. That is the agent’s first output, before any other work.
Handing steps to subagents
Every step starts as parent-run: the main agent reads it, executes it and attests the result. A step that has proven reliable can be promoted. From then on it is dispatched to a subagent that receives only that step and the facts it needs, does the work, and reports back to the run. The main agent keeps the plan, the subagent does the heavy lifting, and neither needs the other’s context.
Audits
A workflow can be audited against the current authoring guidance. The audit compares the tree to the rules, records a verdict and lists findings. It does not change anything by itself.
What to ask your agent
With ContxOS connected to Claude or another MCP client, requests like these work as written:
open run
run position
resume run
Close the run and summarize what was verified.
Limits and requirements
- Delegating steps to subagents requires a client that supports subagents, such as Claude Code.
- A step is promoted to subagents deliberately, after it has run reliably. New steps start with the main agent.
Frequently asked questions
What happens if a session crashes mid-step?
The run still shows the last attested position. The next session reads it and re-does only the step that did not attest.
Can two agents work on the same run?
Steps are dispatched and attested one at a time against the run, so its position stays consistent no matter which agent did the step.
Give your agent a memory that lasts
Connect ContxOS to Claude in about a minute. The free plan includes one project.