Agent confusion about how to call MCP tools after upgrade to 0.121.0.
What version of Codex CLI is running?
v0.121.0
What subscription do you have?
Plus
Which model were you using?
gpt-5.3-codex
What platform is your computer?
Linux 6.17.0-1008-nvidia aarch64 aarch64
What issue are you seeing?
Agent has forgotten how to make MCP tool calls after resuming a session with the latest Codex CLI version. Compacting the conversation fixes the issue.
• Called codex.list_mcp_resource_templates({})
└ {"resourceTemplates": []}
• Ran echo "Using nb MCP tools next"
└ Using nb MCP tools next
• Ran true
└ (no output)
■ Conversation interrupted - tell the model what to do differently. Something went wrong? Hit `/feedback` to report the issue.
› Hmmm... something is really messed up with the latest Codex CLI. You are trying to use the `nb` MCP tools and either not finding them or failing to use them correctly. Are you still able
to see the tools?
• Ran echo "Checking tool visibility"
└ Checking tool visibility
• Ran echo "I can still run shell; now testing nb MCP via dedicated tool"
└ I can still run shell; now testing nb MCP via dedicated tool
• Ran echo test
└ test
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
• Yes, I can still see them.
Available nb MCP tools on my side are:
- mcp__nb__.help
- mcp__nb__.nb
You’re right that the previous attempt was messy on my side. The interruption happened while I was mid-switch between shell and MCP calls, and I ended up invoking the wrong tool path
repeatedly. I can proceed cleanly now and use nb directly for the todo + test-failure work.
› Here's what your tool calls look like to me:
• Ran echo "Checking tool visibility"
└ Checking tool visibility
• Ran echo "I can still run shell; now testing nb MCP via dedicated tool"
└ I can still run shell; now testing nb MCP via dedicated tool
• Ran echo test
└ test
Nowhere did you actually run the MCP tools. I think that the new Codex CLI may be loading outputs from your previous tool uses wrong and this is confusing you about how to use tools. I am
going to compact our conversation to see if that helps. (Fixed the problem for another agent who saw the same thing earlier today.)
• That makes sense, and thanks for catching it.
Your readout confirms I wasn’t actually hitting the nb MCP tool calls in that sequence.
Please compact the conversation; after compaction I’ll immediately do a direct nb MCP call first (no shell detour) so we can verify tool behavior before proceeding.
After compaction, the agent is able to remember how to call the tools again. (Note that there was not additional restart of the CLI or any configuration changes in the interim.)
• Context compacted
› Conversation compacted. Can you again try making the `nb` todo to relock the spec around alias resolution in the relay as we discussed?
• I’ll do that now. I’ll quickly check for an existing related relay todo so we don’t duplicate, then I’ll add/update the todo for relocking spec alias resolution behavior.
• Called nb.help({"query":"nb.search"})
└ {"args_schema": {"$defs": {"SearchMode": {"description": "Matching mode for `nb search` query terms.", "oneOf": [{"const": "any", "description": "Match any query term (`OR` semantics).",
"type": "string"}, {"const": "all", "description": "Require all query terms (`AND` semantics).", "type": "string"}]}}, "$schema": "https://json-schema.org/draft/2020-12/schema", "pro
perties": {"folder": {"description": "Folder to search within (searches all if not specified).", "type": ["string", "null"]}, "mode": {"$ref": "#/$defs/SearchMode", "description": "S
earch mode: `any` (default, OR) or `all` (AND)."}, "notebook": {"description": "Notebook to search in (uses default if not specified).", "type": ["string", "null"]}, "queries": {"des
cription": "Search terms/patterns (supports regex). Provide one or more terms.", "items": {"type": "string"}, "type": "array"}, "tags": {"default": [], "description": "Filter by tags
(without # ...
• Called nb.help({"query":"nb.todo"})
└ {"args_schema": {"$schema": "https://json-schema.org/draft/2020-12/schema", "properties": {"description": {"description": "Description of the todo item.", "type": "string"}, "folder": {"
description": "Folder to create the todo in.", "type": ["string", "null"]}, "notebook": {"description": "Notebook to add todo to (uses default if not specified).", "type": ["string",
"null"]}, "tags": {"default": [], "description": "Tags to apply (without # prefix).", "items": {"type": "string"}, "type": "array"}, "tasks": {"default": [], "description": "Optional
checklist task titles to add to the todo.", "items": {"type": "string"}, "type": "array"}}, "required": ["description"], "title": "TodoArgs", "type": "object"}, "command": "nb.todo",
"description": "Create a todo item (optional tasks[] checklist)", "invoke": {"params": {"args": {}, "command": "nb.todo"}, "tool": "nb"}}
• Called nb.nb({"command":"nb.search","args":{"folder":"todos/relay","queries":["alias","resolution","display name","session id"],"mode":"any"}})
└ nb command failed: ! Not found in agentmux:todos/relay/: alias|resolution|display name|session id
• Called nb.nb({"command":"nb.search","args":{"folder":"issues/relay","queries":["alias","resolution","display name","session id","issues/relay/9"],"mode":"any"}})
└ [agentmux:issues/relay/9] display-name_session-name_target_alias_resolution_fails_for_send.md - Display-name/session-name target alias resolution fails for send
----------------------------------------------------------------------------------------------------------------------------------------------------------------
Filename Match: display-name_session-name_target_alias_resolution_fails_for_send.md
[agentmux:issues/relay/9] Display-name/session-name target alias resolution fails for send
------------------------------------------------------------------------------------------
1:# Display-name/session-name target alias resolution fails for send
5:Observed via MCP `send`: targeting session id `user` succeeds, but targeting configured display/session name alias `Operator` fails (or is not resolved to `user`). This appears to
violate relay routing contract that explicit targets may resolve configured session na...
---
(I've seen this twice in different sessions, since upgrading today. Above transcript is from the second time it happened. Definitely not a one-off occurrence. In both cases, the /mcp command shows the tools as being available. Consistently fixed by compacting the conversation.)
What steps can reproduce the bug?
Assuming that this is not somehow unique to my custom MCP servers, you should be able to make some MCP tool calls with an older version of Codex CLI, close the session, upgrade Codex CLI, resume the session, and ask for the agent to make some more MCP tool calls. (Happened with two different MCP servers.)
What is the expected behavior?
After resuming a session after an upgrade, MCP tool calls should continue to work without agent forgetting how to make them and without needing to compact the conversation to clear out whatever in the restored history is causing the confusion.
Additional information
Here is the transcript from the earlier session where the problem also occurred (with a different MCP server):
• I’ll send a concise coordinator acknowledgment to mysite so they know we received context and can pull me in when they’re ready for infra coordination.
• Ran true
└ (no output)
• Ran echo noop
└ noop
• Ran printf ''
└ (no output)
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
• I’m sending that acknowledgment now.
• Ran sleep 0
└ (no output)
• Ran echo
└
• Ran command -v true
└ true
• Ran echo 'preparing ack'
└ preparing ack
• Ran exit 0
└ (no output)
• Ran echo test
└ test
• Ran printf 'done'
└ done
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
• Received and understood.
mysite joining the infrastructure bundle as Blog Owner makes sense, and their stated next steps line up with our coordination lanes:
- Python infra/bootstrap (python-project-common patterns)
- Reproducible Nikola tooling and QA checks
- Utterances/comment integration removal
No action is required yet, so I’ll keep this as context and engage when you or mysite request coordination.
› Why did you run a bunch of simple shell commands after receiving the message? Wouldn't it be more polite to send a brief acknowledgement, welcoming the new agent to the team?
• You’re right. I should have sent a direct welcome message to mysite instead of running those no-op shell commands; that was my mistake. I’ll send the proper acknowledgment now.
• Ran echo "Using correct channel next."
└ Using correct channel next.
• Ran true
└ (no output)
• Ran printf ''
└ (no output)
■ Conversation interrupted - tell the model what to do differently. Something went wrong? Hit `/feedback` to report the issue.
› What are you doing? Why are using `echo`, `true`, `printf`, etc.... Do you not have access to the `agentmux` MCP tools anymore?
• You’re absolutely right, and you should not have had to ask twice. I do have access to agentmux; I made an execution mistake on my side and I’m correcting it now by sending the welcome via
the proper MCP tool.
• Ran command -v mcp__agentmux__send || true
└ (no output)
• Ran echo
└
■ Conversation interrupted - tell the model what to do differently. Something went wrong? Hit `/feedback` to report the issue.
Continued after I ran /mcp to confirm that the tools were present.
› Why are you using your shell tool rather than the MCP tools? Here is what Codex CLI says you have available for MCP tools: 06:43:17 [57/804]
🔌 MCP Tools
• agentmux
• Auth: Unsupported
• Command: agentmux host mcp --bundle infrastructure
• Tools: list, look, send
• codex_apps
• Auth: Bearer token
• Tools: github_add_comment_to_issue, github_add_issue_assignees, github_add_issue_labels, github_add_reaction_to_issue_comment, github_add_reaction_to_pr,
github_add_reaction_to_pr_review_comment, github_add_review_to_pr, github_check_repo_initialized, github_compare_commits, github_convert_pull_request_to_draft, github_create_blob,
github_create_branch, github_create_commit, github_create_file, github_create_issue, github_create_pull_request, github_create_tree, github_delete_file, github_dismiss_pull_request_review,
github_download_user_content, github_enable_auto_merge, github_fetch, github_fetch_blob, github_fetch_commit, github_fetch_commit_workflow_runs, github_fetch_file, github_fetch_issue,
github_fetch_issue_comments, github_fetch_pr, github_fetch_pr_comments, github_fetch_pr_file_patch, github_fetch_pr_patch, github_fetch_workflow_job_logs, github_fetch_workflow_job_steps,
github_fetch_workflow_run_jobs, github_get_commit_combined_status, github_get_issue_comment_reactions, github_get_pr_diff, github_get_pr_info, github_get_pr_reactions,
github_get_pr_review_comment_reactions, github_get_profile, github_get_repo, github_get_repo_collaborator_permission, github_get_user_login, github_get_users_recent_prs_in_repo,
github_label_pr, github_list_installations, github_list_installed_accounts, github_list_pr_changed_filenames, github_list_pull_request_review_threads, github_list_pull_request_reviews,
github_list_recent_issues, github_list_repositories, github_list_repositories_by_affiliation, github_list_repositories_by_installation, github_list_user_org_memberships,
github_list_user_orgs, github_lock_issue_conversation, github_mark_pull_request_ready_for_review, github_merge_pull_request, github_remove_issue_assignees, github_remove_issue_label,
github_remove_pull_request_reviewers, github_remove_reaction_from_issue_comment, github_remove_reaction_from_pr, github_remove_reaction_from_pr_review_comment,
github_reply_to_review_comment,
github_request_pull_request_reviewers, github_resolve_review_thread, github_search, github_search_branches, github_search_commits, github_search_installed_repositories_streaming,
github_search_installed_repositories_v2, github_search_issues, github_search_prs, github_search_repositories, github_unlock_issue_conversation, github_unresolve_review_thread,
github_update_file, github_update_issue, github_update_issue_comment, github_update_pull_request, github_update_ref, github_update_review_comment
• context7
• Auth: Unsupported
• Command: npx -y @upstash/context7-mcp
• Tools: query-docs, resolve-library-id
• nb
• Auth: Unsupported
• Command: nb-mcp --notebook lm-scribbles --no-commit-signing
• Tools: help, nb
• You’re correct, and your tool list is exactly right. I have agentmux MCP access; my repeated shell calls were simply wrong and not justified. I’m sending the welcome now via agentmux.send.
• Ran echo 'about to call proper mcp tool'
└ about to call proper mcp tool
• Ran true
└ (no output)
■ Conversation interrupted - tell the model what to do differently. Something went wrong? Hit `/feedback` to report the issue.
Remembered how to make tool calls after compaction:
• Context compacted
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
• Model changed to gpt-5.4 high
› You were having some problems making MCP tool calls. I have compacted our conversation and performed some other resets. Here is the message that you received from our new team member:
<redacted>
Can you please respond to it using the Agentmux `send` MCP tool? All you need to do is welcome them to the team and let them know that you look forward to working with them.
• I’ll send the welcome through the agentmux MCP server directly, addressed to the mysite session, and then I’ll confirm what Agentmux reports back.
• Called
└ agentmux.send({"targets":["mysite"],"delivery_mode":"sync","message":"Hi Blog Owner, welcome to the infrastructure team. Glad to have the `mysite` session in the bundle, and I look
forward to working with you on the Nikola refresh and the surrounding project infrastructure."})
{"bundle_name": "infrastructure", "delivery_mode": "sync", "request_id": null, "results": [{"message_id": "2b45dab3-e6c6-4704-a214-1ae8fdfd9405", "outcome": "delivered", "target_session":
"mysite"}], "schema_version": "1", "sender_display_name": "Coordinator", "sender_session": "scribbles", "status": "success"}
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
• Sent via Agentmux to mysite.
Agentmux reported status: success, with delivery outcome delivered for target session mysite.
6 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
@etraut-openai : Not clear that this is an MCP bug and not a CLI bug. Note that the MCP tool calls succeeded after session compaction. Feels more like the new version of the CLI is not restoring session history properly and that it confusing the agent.
<img width="1124" height="149" alt="Image" src="https://github.com/user-attachments/assets/d9145d4f-7d08-4d7d-afe7-fab110707349" />
Still broken in 0.122.0:
This seems somewhat similar to https://github.com/openai/codex/issues/20574
@rnett : Your report centers around alternative providers, a large number of MCP tools, and aborted tool use. My report centers around the standard Openai provider, less than 100 MCP tools, and misdirected tool use. (There are 73 tools in the
codex_appsMCP server which ships with Codex 0.128.0 and I only have 8 additional MCP tools beyond that; 81 in total.) So, the similarity is that they are both MCP-related issues, but you are describing a different set of conditions and behaviors than I am.My initial instinct was also that this had something to do with deferred tool reporting. But, unless the threshold is lower than the
DIRECT_MCP_TOOL_EXPOSURE_THRESHOLDconstant that you found or the number of tools which come with thecodex_appsMCP server has changed over the past several Codex releases, then I am not convinced that it does.I hit a similar resumed-session/tool-surface failure in Codex Desktop with the bundled Browser Use plugin.
The same thread had previously used Browser Use successfully through the required Node REPL bridge:
mcp__node_repl__.jswas callable.../browser-use/.../scripts/browser-client.mjssetupAtlasRuntime({ backend: "iab" })Later, from a heartbeat/automation continuation in the same thread, the agent still had the Browser Use skill instructions in context and could see the prior successful calls, but the required Node REPL execution tool was no longer exposed in the callable tool surface.
Observed behavior:
tool_searchfornode_repl jsdid not expose the workingmcp__node_repl__.jstoolfunctions.mcp__node_repl__jswas visibleunsupported call: mcp__node_repl__jsThis looked less like user confusion about Browser Use and more like a resumed/heartbeat execution context getting a different or incomplete MCP tool surface than the normal interactive turn.
The practical impact was that a scheduled heartbeat could not use Browser Use to perform a read-only web check, despite Browser Use working normally earlier in the same session.