Skip to content

armgit / avibe

Public Imported from GitHub
0

Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.

fix(codex): guide generated image directory

cyhbec59cac7766
diff --git a/modules/agents/codex/agent.py b/modules/agents/codex/agent.py
index a36a04e4c..9b76d6ad1 100644
--- a/modules/agents/codex/agent.py
+++ b/modules/agents/codex/agent.py
@@ -19,9 +19,10 @@ logger = logging.getLogger(__name__)
_CODEX_GENERATED_IMAGE_PROMPT = (
"If you generate an image with Codex, include it in the final reply with Markdown image syntax: "
- "`![generated image](file:///absolute/path/to/image.png)`. "
- "Use only a local absolute path readable by Vibe Remote, never sandbox paths like `/mnt/data/...`; "
- "if no such path is available, leave the final reply empty."
+ "`![generated image](file:///$CODEX_HOME/generated_images/<thread-id>/<image-file>.png)` "
+ "or `![generated image](file:///$HOME/.codex/generated_images/<thread-id>/<image-file>.png)`. "
+ "Use only that local generated_images path, never sandbox paths like `/mnt/data/...`; "
+ "if you cannot determine the path, leave the final reply empty."
)
diff --git a/tests/test_codex_agent.py b/tests/test_codex_agent.py
index 9cf1af460..52a85b92a 100644
--- a/tests/test_codex_agent.py
+++ b/tests/test_codex_agent.py
@@ -712,8 +712,9 @@ class CodexAgentPayloadTests(unittest.IsolatedAsyncioTestCase):
items = agent._build_input(request)
self.assertTrue(items[0]["text"].startswith("If you generate an image with Codex"))
- self.assertIn("![generated image](file:///absolute/path/to/image.png)", items[0]["text"])
- self.assertIn("local absolute path readable by Vibe Remote", items[0]["text"])
+ self.assertIn("$CODEX_HOME/generated_images/<thread-id>/<image-file>.png", items[0]["text"])
+ self.assertIn("$HOME/.codex/generated_images/<thread-id>/<image-file>.png", items[0]["text"])
+ self.assertIn("Use only that local generated_images path", items[0]["text"])
self.assertIn("never sandbox paths like `/mnt/data/...`", items[0]["text"])
self.assertIn("leave the final reply empty", items[0]["text"])
self.assertTrue(items[0]["text"].endswith("hello"))