Repository navigation
feat(adapters)!: any CLI version, prompts on stdin, no harness restrictions - #120
Merged
Merged
Conversation
This was referenced Nov 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
SharedOS decides whether a call that reaches it over MCP is allowed, denied or escalated. What the vendor CLI does with its own tools, which servers it loads and which version it runs are the harness's and the host's. The adapters still set restrictions of SharedOS's own, passed the prompt as one argument, and read output shapes that only some CLI versions print. The DeepSeek adapter read a vocabulary its headless profile never prints, so every dsh turn completed empty. Nothing in this repository pins a CLI version; the pins live in the host images.
What
--disallowedToolsand--strict-mcp-config;--allowedTools mcp__<server>stays, since it only skips the approval prompt for the SharedOS server. Codex loses-c project_root_markers=[]. The DeepSeek overlay losesfailOnStartupError. A host that wants any of these appends it throughargsor its own file. Pi is the one exception on this branch: its launch is unchanged here, and the Pi branch owns it (see Related).E2BIG, and one starting with-is not read as an option. Claude's argument list ends on a flag that takes no value, so a host token appended throughargsis never read as a tool name.bearer_token_env_varandSHAREDOS_MCP_TOKEN, which Codex requires from 0.46. A reconnect notice no longer fails the turn; the CLI'serrorevent is a newnoticestep, and an interrupted turn names the last notice in its failure. A Codex run whose required bridge did not start failsharness_not_connectedwith Codex's reason, and the process is ended.--jsonand the newdeepseekHeadlessProtocolreads that stream: output isfinal.text, the outcome comes fromfinal.reasonor the exit code. A run whose MCP client never reached the bridge failsharness_not_connectedand dsh is ended, instead of doing the task with its own tools while the turn waited.successresult fails the turn; an API error's code is the frame'sterminal_reason; retryability readsapi_error_statusfirst and then the words Claude Code 2.1.319 writes.McpHarnessSpec.readDiagnosticlets a spec read stderr and non-frame stdout lines until the turn has an outcome, and may only fail a turn.HarnessProcessdelivers stderr by the line.probeHarnesstakes anAbortSignal. An outcome at the ignored-frame limit ends the turn instead of failing it.mcp-conformancedeclares each CLI's own tools asharnessLocaland records the policy as the host's declaration.native-conformanceruns each CLI with its own tools and records a CLI's own tool calls as run by the harness underharnessRan, not as refused. ADR 0014 gains a dated amendment.27 files: 2,443 lines added, 417 removed. Of those, regenerated
docs/apiis 165 added and 59 removed, and tests are 1,026 added and 93 removed.What a host has to update
The full list is in the CHANGELOG under Unreleased. The ones most likely to matter:
args.config.tomlitself setsSHAREDOS_MCP_TOKENin Codex's environment; inlinebearer_tokenis gone.workspaceRootsits inside a repository appends-c project_root_markers=[]for Codex.HarnessStephas a new kind,notice.McpHarnessSpec.readDiagnosticandonDiagnosticlines are per line, not per chunk.deepseekHeadlessProtocol,DEEPSEEK_HEADLESS_PROTOCOL_ID,SHAREDOS_MCP_TOKEN_VARIABLE,deepseekMcpEntryId. New error codeharness_not_connected.Related
Follow-up to #118. Siblings off
main: the Pi branch, which moves Pi to its native MCP client and owns every Pi change, including dropping--no-builtin-toolsand--no-session, and rebases ontomainafter this merges; and the limit-notice branch, which tells the model its limits.Checks
pnpm checkis green: format, typecheck, vitest 1205, test:release 7/7,docs:api:checkandconformance:check(172 pass, manifest up to date).required), dsh 0.2.2-rc.1, with a stand-in model endpoint where a turn had to run.