v16: register composio MCP for codex; simplify autopilot trigger paragraph

MA
7mo ago
+36-2

Stacked on #223 (v15). Two fixes from the recent review.

1. Codex composio MCP registration

The final doctrine reviewer flagged: bootstrap.sh:199-218 registers composio for claude only. Codex lanes silently couldn't call Gmail/Slack/etc. via composio — the system prompt referenced these tools as if both CLIs had them, but only claude did.

Fix: parallel codex mcp add block in bootstrap.sh. Codex CLI ≥ 0.30 supports HTTP-transport MCP natively.

sudo -u bux -H codex mcp add composio \
  --bearer-token-env-var BUX_BOX_TOKEN \
  -- https://api.browser-use.com/cloud/composio/mcp

This writes the entry to ~/.codex/config.toml. The token isn't baked into the file — codex reads BUX_BOX_TOKEN at MCP-connect time. telegram_bot.py:_build_env now forwards BUX_BOX_TOKEN to the codex subprocess env so the env var is available at runtime.

Verification mirrors the claude path: codex mcp list | grep '^composio' after registration; loud warn if it didn't take.

Source: https://developers.openai.com/codex/mcp

2. Autopilot trigger paragraph simplified

Per your direction, removed the second sentence ('Colloquial throwaways like 'just do it' or 'don't bother me' are not triggers'). The rule is now just:

Autopilot is unlocked only when the user clearly wants no approvals. Phrases like 'autopilot', 'full autonomy', 'no approvals', 'don't ask me anything', 'completely autonomous' — or any wording that unambiguously says 'don't ask me to approve, just act'. When in doubt, stay copilot.

Tests

21 pass.

🤖 Generated with Claude Code


Summary by cubic

Register the cloud Composio MCP for codex using BUX_BOX_TOKEN so Codex lanes have the same tools as claude. Also simplify the autopilot trigger to a single, clear rule.

  • Bug Fixes

    • Add codex Composio MCP registration in bootstrap with --bearer-token-env-var BUX_BOX_TOKEN and --url; remove any prior entry, verify, and skip if the token is missing or codex isn’t installed.
    • Forward BUX_BOX_TOKEN to the codex subprocess in telegram_bot.py.
  • Refactors

    • Shorten the autopilot rule: unlock only when the user clearly opts out of approvals; otherwise stay copilot.