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.
Python agentagent-osaiai-agentsai-partnerchatopsclaudeclaude-codecodexdevtoolsdiscord-botlark-botllmlocal-firstlong-term-memoryopencodeslack-botvibe-codingvibeywechat
fix(logging): rename log file and surface codex errors
yh ce8c9e5a46afe
diff --git a/AGENTS.md b/AGENTS.mdindex bb660a497..b3a4305ac 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -1,7 +1,7 @@# Repository Guidelines## Project Structure & Module Organization-`main.py` is the entry point that wires `config.AppConfig` into the runtime `Controller`. Core orchestration和 handlers live under `core/` (e.g., `core/controller.py`, `core/handlers/*`). Agent integrations now live in `modules/agents/` (shared base, Claude/Codex backends, registry), while IM transports stay in `modules/im/`. Configuration defaults live in `config/` (`agent_routes.example.yaml` + gitignored `agent_routes.yaml` at repo root control per-channel routing), reference docs in `docs/`, static assets in `assets/`, and `_tmp/` is the default remote working directory for agent sessions. Keep runtime logs inside `logs/claude_proxy.log` and persist chat state in `user_settings.json`.+`main.py` is the entry point that wires `config.AppConfig` into the runtime `Controller`. Core orchestration和 handlers live under `core/` (e.g., `core/controller.py`, `core/handlers/*`). Agent integrations now live in `modules/agents/` (shared base, Claude/Codex backends, registry), while IM transports stay in `modules/im/`. Configuration defaults live in `config/` (`agent_routes.example.yaml` + gitignored `agent_routes.yaml` at repo root control per-channel routing), reference docs in `docs/`, static assets in `assets/`, and `_tmp/` is the default remote working directory for agent sessions. Keep runtime logs inside `logs/vibe_remote.log` and persist chat state in `user_settings.json`.## Build, Test, and Development Commands- `python -m venv .venv && source .venv/bin/activate` – create an isolated environment before installing dependencies.@@ -20,7 +20,7 @@ There is no committed automated test suite yet; favor fast pytest-style modulesCommits follow the `type(scope): summary` pattern visible in history (`fix(slack): …`, `feat(status): …`). Keep them small and focused on a single concern, referencing issues when relevant. Every PR must describe intent, list functional changes, attach logs or screenshots for UX-affecting updates, and call out config impacts (new env vars, migrations). Update README/docs whenever behavior or setup steps change, and ensure `pip install -r requirements.txt && ./start.sh` still works from a clean clone.## Security & Configuration Tips-Never commit `.env`, tokens, or Slack/Telegram secrets; rely on `.env.example` plus local overrides. Validate IM scopes (`SLACK_REQUIRE_MENTION`, `TELEGRAM_TARGET_CHAT_ID`) through `config/settings.py` before shipping, and document any new flags. Keep `CLAUDE_DEFAULT_CWD` scoped to `_tmp/` or another sanitized path so that remote agents cannot escape the intended workspace. Logs may contain sensitive thread context—rotate `logs/claude_proxy.log` in production and scrub before sharing.+Never commit `.env`, tokens, or Slack/Telegram secrets; rely on `.env.example` plus local overrides. Validate IM scopes (`SLACK_REQUIRE_MENTION`, `TELEGRAM_TARGET_CHAT_ID`) through `config/settings.py` before shipping, and document any new flags. Keep `CLAUDE_DEFAULT_CWD` scoped to `_tmp/` or another sanitized path so that remote agents cannot escape the intended workspace. Logs may contain sensitive thread context—rotate `logs/vibe_remote.log` in production and scrub before sharing.## Agent Routing & Codex Notes- Enable Codex (on by default) via `CODEX_ENABLED=true` and ensure the CLI is reachable (`CODEX_CLI_PATH`).diff --git a/README.md b/README.mdindex 32dd6f522..4ae825ede 100644--- a/README.md+++ b/README.md@@ -191,6 +191,6 @@ MIT. See `LICENSE`.- **Secrets**: Never commit tokens. Use `.env`. Rotate regularly.- **Whitelists**: Restrict access via `SLACK_TARGET_CHANNEL` (channels only, `C…`) or `TELEGRAM_TARGET_CHAT_ID`. `null` accepts all; empty list limits to DMs/groups accordingly (Slack DMs currently unsupported).-- **Logs**: Runtime logs at `logs/claude_proxy.log`.+- **Logs**: Runtime logs at `logs/vibe_remote.log`.- **Session persistence**: `user_settings.json` stores per‑thread/chat session mappings and preferences; persist this file in production.- **Cleanup**: Set `CLEANUP_ENABLED=true` to safely prune completed receiver tasks during message handling for long‑running processes.diff --git a/README_ZH.md b/README_ZH.mdindex 0d7593667..d92301f9f 100644--- a/README_ZH.md+++ b/README_ZH.md@@ -189,6 +189,6 @@ MIT,详见 `LICENSE`。- **Secrets**:不要提交 Token;使用 `.env`,并定期轮换。- **Whitelists**:通过 `SLACK_TARGET_CHANNEL`(仅频道,`C…`)或 `TELEGRAM_TARGET_CHAT_ID` 限制访问。`null` 允许全部;空列表则只在相应上下文生效(Slack DM 当前不支持)。-- **Logs**:运行日志位于 `logs/claude_proxy.log`。+- **Logs**:运行日志位于 `logs/vibe_remote.log`。- **会话持久化**:`user_settings.json` 存储每个线程/聊天的会话映射与偏好;生产环境请持久化此文件。- **清理**:设置 `CLEANUP_ENABLED=true`,在消息处理入口安全清理已完成的接收任务,适合长时间运行。diff --git a/core/controller.py b/core/controller.pyindex b2952e112..bdecb9a1b 100644--- a/core/controller.py+++ b/core/controller.py@@ -196,8 +196,12 @@ class Controller:message_type != "notify"and self.settings_manager.is_message_type_hidden(settings_key, message_type)):+ preview = text if len(text) <= 500 else f"{text[:500]}…"logger.info(- f"Skipping {message_type} message for settings {settings_key} (hidden)"+ "Skipping %s message for settings %s (hidden). Preview: %s",+ message_type,+ settings_key,+ preview,)returntarget_context = self._get_target_context(context)diff --git a/main.py b/main.pyindex 40854d469..f7151beb5 100644--- a/main.py+++ b/main.py@@ -32,8 +32,8 @@ def setup_logging(level: str = "INFO"):format=log_format,handlers=[logging.StreamHandler(sys.stdout),- logging.FileHandler(f'{logs_dir}/claude_proxy.log')- ]+ logging.FileHandler(f"{logs_dir}/vibe_remote.log"),+ ],)@@ -47,7 +47,7 @@ def main():setup_logging(config.log_level)logger = logging.getLogger(__name__)- logger.info("Starting Claude Proxy...")+ logger.info("Starting vibe-remote service...")logger.info(f"Working directory: {config.claude.cwd}")# Create and run controller@@ -60,4 +60,4 @@ def main():if __name__ == "__main__":- main()\ No newline at end of file+ main()diff --git a/modules/agents/codex_agent.py b/modules/agents/codex_agent.pyindex 3b9df7ba0..bc60af007 100644--- a/modules/agents/codex_agent.py+++ b/modules/agents/codex_agent.py@@ -156,6 +156,7 @@ class CodexAgent(BaseAgent):def _build_command(self, request: AgentRequest, resume_id: Optional[str]) -> list:cmd = [self.codex_config.binary, "exec", "--json"]cmd += ["--dangerously-bypass-approvals-and-sandbox"]+ cmd += ["--skip-git-repo-check"]if self.codex_config.default_model:cmd += ["--model", self.codex_config.default_model]@@ -202,8 +203,8 @@ class CodexAgent(BaseAgent):joined = "\n".join(buffer[-10:])await self.controller.emit_agent_message(request.context,- "system",- f"```stderr\n{joined}\n```",+ "notify",+ f"❗️ Codex stderr:\n```stderr\n{joined}\n```",parse_mode="markdown",)@@ -274,14 +275,14 @@ class CodexAgent(BaseAgent):if event_type == "error":message = event.get("message", "Unknown error")await self.controller.emit_agent_message(- request.context, "system", f"❌ Codex error: {message}"+ request.context, "notify", f"❌ Codex error: {message}")returnif event_type == "turn.failed":error = event.get("error", {}).get("message", "Turn failed.")await self.controller.emit_agent_message(- request.context, "system", f"⚠️ Codex turn failed: {error}"+ request.context, "notify", f"⚠️ Codex turn failed: {error}")request.last_agent_message = Nonereturn