The agent should create a dedicated workspace/artifact for long-term tasks.
Because a long mission might require multiple tasks and may run indefinitely, the agent should store related output/work in the dedicated workspace for the mission. They should also have an index file/MD file that stores details about the mission when possible, so subsequent tasks can get the context of the mission easily.
This, however, might conflict with the purpose of MEMORY.md.