Skip to content

docs: document run modes for the runs API and the MCP start tool - #141

Merged
charlesrhoward merged 7 commits into
mainfrom
docs/run-mode
Sep 29, 2026
Merged

charlesrhoward merged 7 commits into
mainfrom
docs/run-mode

Conversation

@charlesrhoward

@charlesrhoward charlesrhoward commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

The runs API reference listed mode?: string with no meaning attached. It now spells out the three values and what each lets a Codex or Claude Code harness do. It is explicit that SAFE keeps the harness from changing the checkout but doesn't screen MCP tools, so a connection or Mogplex tool that writes can still make changes. It also covers the 400 for any other value and the refusal of mode for Mogplex-harness runs.

The run detail now documents the mode it reports: the upper-cased mode the request named, or null when none was sent and for Mogplex-harness runs. It stays typed as a string because the Mogplex CLI's cloud runs report the CLI's own run mode.

The reference also stops treating the runs API as Codex and Claude Code only. harness accepts "mogplex" (the API's MOGPLEX_API_RUN_HARNESSES), so the request and detail types, the endpoint index, and the MCP tool row now include it. A short paragraph covers how a Mogplex run differs: it takes no mode and always works on its own branch.

The MCP tools page now notes that mogplex_start_agent_run takes mode and links to the API reference. Separately, the MCP transport section said there were 23 tool schemas. The tools page lists 29, and that's the real count (14 automation, 11 infrastructure, 4 run tools), so the reference now says 29.

This matches Mogplex/mogplex#538, which adds mode to the MCP tool and validates it in the API. #538 is deployed to production (deploy run 36517937254, 2026-09-29).


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@vercel

vercel Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
mogplex-docs Ready Ready Preview Sep 29, 2026 4:13am UTC

Request Review

@mogplex mogplex Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Mogplex PR Review

Status: Attention needed

Approve-ready docs PR: the mode documentation is accurate and candid that SAFE does not screen MCP tools, the new #start-a-run anchor resolves, and the 23-to-29 tool-count fix matches the 29 tools catalogued in content/docs/mcp/tools.mdx. One warning: the Endpoint index row for POST /runs still says "Start a Codex or Claude Code run" although this PR adds the mogplex harness to both harness unions. Remaining findings are non-blocking wording and PR-description suggestions; backend-dependent claims rest on Mogplex/mogplex#538, which the author already gates the merge on.

3 findings were added inline.

Suggestions

  • PR description omits the response mode field and the tool-count fix (content/docs/reference/api.mdx)
    The PR body covers the mode semantics and the Mogplex-harness mode refusal, but does not mention adding mode to MogplexApiRunDetail (line 723) or changing the MCP tool-schema count from 23 to 29 (line 898).

    A one-line note on each would help future readers trace those lines; the count fix in particular is a drive-by correctness fix (it brings api.mdx in line with the 29 tools already catalogued in tools.mdx) and is easy to miss.

View check run

@@ -741,20 +745,38 @@ Request body:
type StartRunRequest = {
repoId: string;
prompt: string; // At most 100,000 characters.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Warning: Endpoint index still describes POST /runs as Codex or Claude Code only

This PR adds "mogplex" to harness in MogplexApiRunDetail (line 712) and StartRunRequest (line 747) and documents the Mogplex harness under the "Start a run" section, but the POST /runs row of the Endpoint index table still reads "Start a Codex or Claude Code run.", which now contradicts the request type documented on the same page.

Update the index row (for example, "Start a Codex, Claude Code, or Mogplex agent run."). While there, check the mogplex_start_agent_run row in content/docs/mcp/tools.mdx ("Start a Codex or Claude Code run in a repo sandbox."): if that MCP tool also accepts harness: "mogplex", the row is stale for the same reason; if it does not, no change is needed.

This assumes harness: "mogplex" is accepted by POST /runs per Mogplex/mogplex#538; if it is not, the StartRunRequest union is the part that needs revisiting instead.

Comment thread content/docs/reference/api.mdx Outdated
createBranch: boolean;
};
rootDirectory: string | null;
// The mode the run started with, upper-cased. null: the default, AUTO, or a

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggestion: Clarify when mode is null in MogplexApiRunDetail

The comment on the new mode field ("null: the default, AUTO, or a Mogplex-harness run, which takes no mode") can be misread as null also covering an explicit mode: "AUTO".

If an omitted mode maps to null while an explicit "AUTO" reports "AUTO", say so directly, for example: "null when the request omitted mode (the default, AUTO) or for a Mogplex-harness run, which takes no mode."

Also consider naming what "older Mogplex CLIs" refers to (runs started before mode validation shipped); this page otherwise presents only Codex and Claude Code as harnesses, so the phrase may puzzle external readers.

`mogplex_start_agent_run` also takes `mode` (`SAFE`, `AUTO`, or `YOLO`) for
Codex and Claude Code runs. See [Start a run](/reference/api#start-a-run) for
what each mode allows, including the MCP tools that stay callable in `SAFE`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggestion: Rephrase "the MCP tools that stay callable in SAFE"

The new sentence in content/docs/mcp/tools.mdx points readers to the API section "including the MCP tools that stay callable in SAFE", which reads like a curated subset remains callable. The linked section says MCP tools are not screened at all in SAFE.

A phrasing like "including that MCP tools are not screened in SAFE and stay callable" avoids implying a list.

@mogplex mogplex Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Mogplex PR Review

Status: Attention needed

Needs discussion rather than changes: the run-mode documentation matches merged Mogplex/mogplex#538 (mode semantics, the SAFE/MCP-tool boundary, mogplex-harness 400s, response typing, and the verified 23→29 tool-count fix), but "Any other value returns 400 BAD_REQUEST" at api.mdx:778 is contradicted by #538, which accepts six legacy CLI modes (single, multi_agent, council, review, test, repair) and runs them as AUTO — a carve-out this PR's own mode comment cites. The author should either add a caveat or confirm the strict phrasing is intentional.

2 findings were added inline.

View check run

Any other value returns `400 BAD_REQUEST`.

`harness: "mogplex"` runs Mogplex's own agent instead of a CLI. It takes no
`mode` (sending one returns `400`), always works on its own branch (it creates

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Warning: 'Any other value returns 400' is contradicted by the legacy CLI modes the mode comment cites

Per Mogplex/mogplex#538 — the implementation this PR documents — normalizeStartRequest also accepts six legacy CLI orchestration modes (single, multi_agent, council, review, test, repair, matched exactly in lowercase), stores them unchanged, and runs them as AUTO, so POST /runs with mode: "single" returns 202 rather than 400.

That is the exact silent-AUTO failure mode #538's validation was added to close, and a caller sending one of those strings today gets a fully permissive run instead of the promised 400.

The page's own mode comment (L720–L725) cites single as a real response value, so the two statements conflict within one section.

Suggest either a caveat here — e.g. "except a few orchestration modes sent by released Mogplex CLIs (such as single), accepted for compatibility and run as AUTO" — or, if the strict phrasing is deliberate policy (#538 keeps legacy modes out of the published schema), drop the single example from the comment so the page doesn't contradict itself.

Use [Install Mogplex MCP](/mcp/install) for client setup and OAuth. Use
[MCP tools](/mcp/tools) for all 23 tool argument schemas.
[MCP tools](/mcp/tools) for all 29 tool argument schemas.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggestion: PR description omits the 23→29 tool-schema count fix

The PR description covers the mode documentation but not the 23 → 29 change in the MCP transport section.

The new count is correct: tools.mdx lists exactly 29 tools and its intro already said 29, so this fixes a stale cross-reference.

A one-line mention in the PR description would keep the body complete; no doc change needed.

@mogplex

mogplex Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Mogplex PR Review

Status: No material issues found

Approve-ready docs-only change: the new run-mode documentation is accurate and internally consistent across both files, the mogplex harness value is added everywhere it belongs, and the 23→29 MCP tool-count correction matches the 29 tools actually listed on the tools page.

  • content/docs/reference/api.mdx:759 plus the prose at 766-786 documents mode coherently: SAFE/AUTO/YOLO, case-insensitive, default AUTO, 400 for other values, legacy Mogplex CLI cloud-run modes (e.g. single) accepted for compatibility and run as AUTO, and mode refused for harness: "mogplex".
  • The mode: string | null comment at content/docs/reference/api.mdx:720-725 agrees with that prose: upper-cased reporting, null when omitted (AUTO applies) and for Mogplex-harness runs, and string rather than a union because legacy CLI modes are stored as sent.
  • "mogplex" is added consistently to both harness unions (api.mdx:712, api.mdx:752), the endpoint index row (api.mdx:160), and the MCP tool row (content/docs/mcp/tools.mdx:89).
  • The SAFE caveat — MCP tools are not screened and stay callable — is stated identically in both files (api.mdx:768-771, tools.mdx:27-29).
  • The 23 → 29 fix at content/docs/reference/api.mdx:902 is correct: the tools page lists 8 discovery/sandbox + 3 env-var + 14 automation + 4 run tools = 29, matching the page intro, which already said 29.
  • Cross-links resolve: tools.mdx:28 → /reference/api#start-a-run (the ### Start a run heading exists and the endpoint index uses the same anchor) and the MCP transport section → /mcp/tools.
  • The PR description matches the diff claim-for-claim. Behavioral claims (mode semantics, the legacy single exception, the 400 when mode is sent on a Mogplex-harness run) rest on feat(mcp): accept a run mode in mogplex_start_agent_run mogplex#538, cited as deployed to production; they are mutually consistent throughout, which is as far as this repo can verify.

Affected files

  • content/docs/reference/api.mdx
  • content/docs/mcp/tools.mdx

View check run

@charlesrhoward
charlesrhoward merged commit d4187d5 into main Sep 29, 2026
8 checks passed
@charlesrhoward
charlesrhoward deleted the docs/run-mode branch September 29, 2026 04:22

This branch was successfully deployed

1 active deployment
Preview — 89898bb2 Deployed Sep 29, 2026 by vercel[bot]
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