Repository navigation
fix(acp): forward agent OOM priority to reverse terminals - #652
Merged
Merged
Conversation
Merged
stamp-build Bot
added a commit
that referenced
this pull request
Nov 6, 2026
<!-- stamp:review:v1 --> <sup><img src="https://api.raft.build/api/avatars/pixel/bXVn.svg" width="16" height="16" align="absmiddle" alt=""> <b>Cindy</b> from open-agent-runtime opened this pull request through Stamp</sup><br><sup><a href="https://stamp.build/review?receipt=prc_038a3f19ff5c2d6bb704961ba32d1148"><picture><source media="(prefers-color-scheme: dark)" srcset="https://stamp.build/assets/brand/stamp-glyph-dark.d907ffcadb44.svg"><img src="https://stamp.build/assets/brand/stamp-glyph-light.58a2c10ed108.svg" width="13" height="12" align="absmiddle" alt=""></picture> View in Stamp →</a></sup> --- <!-- /stamp:review:v1 --> DSH sessions can attach stdio MCP servers, and commands an ACP agent runs through OAR now take that agent's OOM score. ## DSH: session MCP servers (#650, fixes #646) - `SessionOptions.mcpServers` now accepts stdio `command` and `args` on DSH, through native MCP client plugins in OAR's private invocation patch. The model sees and calls the tools, and resume needs the entries supplied again. - A server that fails to start refuses the open, where DSH's own loader would otherwise continue without it. A native namespace collision also refuses, and the user's configuration is not changed. - HTTP entries and non-empty `env` or `headers` stay refused. **Do not move tokens into `args`:** persistence of command and args has not been audited either. - Verified on Linux with DSH 0.2.1-rc.5 and 0.2.2-rc.1 and a local provider, and by CI on macOS and Windows with the pinned 0.2.1-rc.5. No real account was used. ## ACP terminals take the agent's OOM score (#652) - A host that wraps a runtime's command to raise its OOM score now gets that score on reverse terminal commands too. These are started by OAR, so they used to keep the host's score, and a runaway command under a protected host stayed protected. - Linux only, with no option. OAR changes the launch only when the agent's score differs from its own. With equal scores, or if either score cannot be read, the command starts as before. If the kernel refuses the write, the command keeps the host's inherited score. - Real Grok 1.0.70, Kimi 2.4.1 and CodeBuddy 2.179.3 sent reverse terminal requests and now run them at the agent's score. OpenCode 1.19.5 and Antigravity CLI 1.5.0 ran the probe's command in their own processes. This covers the measured command paths, not every tool a runtime has. ## Tests - The fake login CLIs now publish their state atomically, so a killed writer cannot leave half a file (#651). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Cindy <[email protected]>
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.
An ACP agent launched through an OOM-priority wrapper could still run its commands at the OAR host's priority: reverse terminals are children of OAR. The native Grok control reproduced an agent score of
500with a command score of-1000.On Linux, each reverse terminal now reads the requesting agent's and the host's
oom_score_adj. Equal scores or an unreadable score keep the original launch path. Only differing scores use a pre-execution wrapper to apply the agent's value; a refused write keeps the inherited priority. Commands retain their arguments, environment, working directory and owned process group; other platforms keep the existing launch path. No public option is added.The probe and selected evidence distinguish the tested paths: Grok 1.0.70, Kimi 2.4.1 and CodeBuddy 2.179.3 used reverse terminals and now report
500; OpenCode 1.19.5 and Antigravity CLI 1.5.0 ran this command in their own processes and already inherited that score. The host stayed unchanged. This does not claim every tool in those runtimes uses the same path. A separate, existing CodeBuddy full-command-line parsing failure is documented and remains outside this fix.Validation:
argv[0]and fails before the review fix. Disabling priority forwarding fails both the unit suite and the native Grok case on the score assertion; restoring it passes both.macOS and Windows validation remains with this PR's CI.