## Bug Fixes ### Critical - **agent_loop.py**: Fix JSONDecodeError crash when LLM returns malformed tool arguments - **ga.py**: Fix file_write prepend mode data loss on write failure (atomic write via tmpfile+rename) - **ga.py**: Sandboxed inline_eval - remove history exposure, restrict builtins - **ga_ultraplan.py**: Add Bearer token auth to /exec HTTP endpoint ### High - **agentmain.py**: Fix thread safety - use self.lock for is_running/stop_sig mutations - **llmcore.py**: Fix tryparse unhandled exception on final fallback ### Medium - **agentmain.py**: Fix 7 file handle leaks (open without with) - **ga.py**: Fix file handle leaks in code_run, _check_plan_completion
Bug Fixes
Critical
High
Medium