Skip to content

Register Composio MCP for Codex agents#172

Open
ShawnPana wants to merge 1 commit into
mainfrom
fix-codex-connected-context
Open

Register Composio MCP for Codex agents#172
ShawnPana wants to merge 1 commit into
mainfrom
fix-codex-connected-context

Conversation

@ShawnPana
Copy link
Copy Markdown
Contributor

@ShawnPana ShawnPana commented May 13, 2026

Summary

  • register the cloud Composio MCP server in Codex config during install/bootstrap
  • forward BUX_BOX_TOKEN into Codex turns so the MCP bearer-token env var resolves
  • add a regression test covering the Codex-only box-token env handoff

Tests

  • bash -n install.sh agent/bootstrap.sh
  • /opt/bux/venv/bin/python -m unittest agent/test_telegram_bot.py
  • /opt/bux/venv/bin/python -m unittest discover -s agent -p 'test_*.py'

Summary by cubic

Registers the cloud Composio MCP server for codex agents and passes BUX_BOX_TOKEN at turn time so Codex can use connected tools. Adds a regression test to ensure the token is only exposed to Codex, not Claude.

  • New Features
    • install.sh and agent/bootstrap.sh register codex MCP composio with --bearer-token-env-var BUX_BOX_TOKEN, skipping if codex is missing or BUX_BOX_TOKEN is unset.
    • agent/telegram_bot.py adds BUX_BOX_TOKEN to the env for Codex only.
    • agent/test_telegram_bot.py verifies Codex receives BUX_BOX_TOKEN and Claude does not.

Written for commit dcfc03b. Summary will update on new commits.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 4 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="install.sh">

<violation number="1" location="install.sh:489">
P2: `BUX_BOX_TOKEN` is not persisted on reruns when `/etc/bux/env` already exists, so existing installs can miss the token after upgrade.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.

Comment thread install.sh
BROWSER_USE_API_KEY=$BROWSER_USE_API_KEY
BUX_PROFILE_ID=$BUX_PROFILE_ID
EOF
if [ -n "$BUX_BOX_TOKEN" ]; then
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot May 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: BUX_BOX_TOKEN is not persisted on reruns when /etc/bux/env already exists, so existing installs can miss the token after upgrade.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At install.sh, line 489:

<comment>`BUX_BOX_TOKEN` is not persisted on reruns when `/etc/bux/env` already exists, so existing installs can miss the token after upgrade.</comment>

<file context>
@@ -483,6 +486,9 @@ if [ ! -f /etc/bux/env ]; then
 BROWSER_USE_API_KEY=$BROWSER_USE_API_KEY
 BUX_PROFILE_ID=$BUX_PROFILE_ID
 EOF
+	if [ -n "$BUX_BOX_TOKEN" ]; then
+		printf 'BUX_BOX_TOKEN=%s\n' "$BUX_BOX_TOKEN" >> /etc/bux/env
+	fi
</file context>
Fix with Cubic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant