diff --git a/metagpt/actions/write_code.py b/metagpt/actions/write_code.py index 779fe52a6..1aa76b67e 100644 --- a/metagpt/actions/write_code.py +++ b/metagpt/actions/write_code.py @@ -95,7 +95,7 @@ class WriteCode(Action): async def run(self, *args, **kwargs) -> CodingContext: bug_feedback = await self.file_repo.get_file(filename=BUGFIX_FILENAME, relative_path=DOCS_FILE_REPO) - coding_context = CodingContext.loads(self.context.content) + coding_context = CodingContext.loads(self.i_context.content) test_doc = await self.file_repo.get_file( filename="test_" + coding_context.filename + ".json", relative_path=TEST_OUTPUTS_FILE_REPO )