Skip to content

Conversation

bolinfest
Copy link
Collaborator

@bolinfest bolinfest commented Aug 20, 2025

To test:

cd codex-rs/exec-command-mcp
cargo build
npx @modelcontextprotocol/inspector ../target/debug/exec-command-mcp

Then in the inspector, expand the Configuration on the left and make the timeouts absurdly large.

Then hit Connect and List Tools like normal and choose the functions.exec_command tool.

Then for the cmd, use:

count=0
while true; do
  echo "$count"
  ((count++))
  sleep 1
done

and maybe reduce yield_time_ms to something relatively short, like 4000:

Screenshot 2025-08-19 at 11 37 23 PM 1

You should see only three numbers print (because the timeout is 4000) and make note of the sessionId, which is likely 0 if this is your first tool call:

Screenshot 2025-08-19 at 11 39 03 PM

Now change to the functions.write_stdin tool and change yield_time_ms to something like 5000, but most importantly, change session_id to match whatever you got back from the previous request:

Screenshot 2025-08-19 at 11 43 12 PM

Now the response let the tool run for yield_time_ms and include new output from that timeperiod, though if there is room in max_output_tokens, it will include more of the backlog:

Screenshot 2025-08-19 at 11 45 25 PM

I'm also trying the following in my config.toml after doing cargo build in /Users/mbolin/code/codex4/codex-rs:

experimental_disable_built_in_shell_tool = true

[mcp_servers.server-name]
command = "/Users/mbolin/code/codex4/codex-rs/target/debug/exec-command-mcp"

@bolinfest bolinfest force-pushed the pr2500 branch 2 times, most recently from e3d1f10 to bb2d88a Compare August 20, 2025 20:50
@bolinfest
Copy link
Collaborator Author

Closing this in favor of #2574.

@bolinfest bolinfest closed this Aug 22, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Aug 22, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant