refactor(agent): tighten completion and storage semantics