Skip to content

mcp: tool descriptions state the export rank limit; Codex how-to tested - #139

Merged
glitch401 merged 1 commit into
astro-weights:mainfrom
officialbidisha:mcp-export-rank-hint
Nov 23, 2026
Merged

glitch401 merged 1 commit into
astro-weights:mainfrom
officialbidisha:mcp-export-rank-hint

Conversation

@officialbidisha

@officialbidisha officialbidisha commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

I ran astro-weights mcp RUN_DIR with Codex as the MCP client, on the tiny random Llama from the first-agent-run tutorial (codex-cli 0.171.0, ChatGPT sign-in, astro-weights 0.2.2, macOS arm64), using headless codex exec.

What I found:

  1. codex exec refused every MCP call with MCP tool call requires approval, but approval policy is never. Setting default_tools_approval_mode = "approve" on the server entry fixes it. The Codex page now documents this.
  2. With approvals on, Codex used every tool but saved dense edits just under the 0.5 cap, and finish returned export_error (rel_residual 0.71 at rank 8). The export limit is in the reference docs but not in the tool descriptions, which are all an MCP client sees. The exec_python and finish descriptions now state it, with a test.
  3. A third run with the limit stated passed end to end: exec_python, forward_pass submit and poll, status, finish, and an exported adapter that astro-weights inspect verifies.

The Codex page's "not tested" notices are replaced with a "Tested once" line, as on the Claude Code page.

Not tested: a job running longer than Codex's 60 s tool timeout (tiny-model jobs finish in seconds), and interactive Codex.

Linked issue

Closes #107

Checks run

  • uv run ruff check
  • uv run ruff format
  • uv run mypy src tests
  • uv run lint-imports
  • uv run pytest
  • uv run --extra hf pytest (if runners/ was touched)

Also ran tests/test_mcp_server.py and tests/test_docs_snippets.py with the mcp and hf extras, and zensical build --strict. The new test fails on main and passes here.

Changelog

  • Added a fragment in changes/, or this PR has the skip-changelog label

AI disclosure

Tools used: Claude Code (Claude Opus 5.5). Codex CLI 0.171.0 was the client being tested.

What they produced: the docstring, test, docs and changelog changes, and it ran the three Codex sessions. I reviewed the diff and the session logs, and committed and signed off myself.

  • I have reviewed and understand every line of this change.

DCO

  • Every commit is signed off by me (git commit -s). My agent did not add Signed-off-by (maintainers: my agent signs off on my standing instruction, and I review before merge).

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: officialbidisha1 <[email protected]>

@glitch401 glitch401 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM!

@glitch401

Copy link
Copy Markdown
Member

merged! appreciate your contribution, helps us scaling with codex 💃

@glitch401
glitch401 added this pull request to the merge queue Nov 23, 2026
Merged via the queue into astro-weights:main with commit b74586c Nov 23, 2026
15 checks passed
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.

Test the MCP server with Codex and lift the "not tested" banner

2 participants