Add the Claude Managed Agents harness - #229
Open
klesse413 wants to merge 1 commit into
Open
Conversation
klesse413
commented
Aug 5, 2026
| } | ||
| } | ||
|
|
||
| function toolOptions(opts: ClaudeHarnessOptions, turn?: HarnessTurnInput): PiToolsOptions { |
Author
There was a problem hiding this comment.
felt not great to add a 4th exact copy, so refactored all of them to use the pi copy. but would be happy to remove this change if the copies are intentional
|
Nehi chahiye
Stop
…On Wed, Aug 5, 2026, 11:09 AM Katelyn Lesse ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In src/harness/claude-harness.ts
<#229 (comment)>:
> @@ -188,63 +164,8 @@ class MessageQueue implements AsyncIterable<SDKUserMessage> {
}
}
-function toolOptions(opts: ClaudeHarnessOptions, turn?: HarnessTurnInput): PiToolsOptions {
felt not great to add a 4th exact copy, so refactored all of them to use
the pi copy. but would be happy to remove this change if the copies are
intentional
—
Reply to this email directly, view it on GitHub
<#229?email_source=notifications&email_token=BNVNQZOEJ4ZNEGALAFHNZDD5ILCBVA5CNFSNUABKM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UKJSXM2LFO4XTIOBWGEZTENZWGAZ2M4TFMFZW63VKON2WE43DOJUWEZLEUVSXMZLOOSWGM33PORSXEX3DNRUWG2Y#pullrequestreview-4861327603>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BNVNQZN6CFW5XWJPDXQLANT5ILCBVAVCNFSNUABGKJSXA33TNF2G64TZHMYTGMJWGUZDOMZRHA5US43TOVSTWNJQGY3TMOJRGI4THILWAI>
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
<https://github.com/notifications/mobile/ios/BNVNQZOVFRJ2UNWOGPHBXKT5ILCBVA5CNFSNUABKM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UKJSXM2LFO4XTIOBWGEZTENZWGAZ2M4TFMFZW63VKON2WE43DOJUWEZLEUVSXMZLOOSVGM33PORSXEX3JN5ZQ>
and Android
<https://github.com/notifications/mobile/android/BNVNQZMKH4ITGGYAK5FLEXD5ILCBVA5CNFSNUABKM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UKJSXM2LFO4XTIOBWGEZTENZWGAZ2M4TFMFZW63VKON2WE43DOJUWEZLEUVSXMZLOOSXGM33PORSXEX3BNZSHE33JMQ>.
Download it today!
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
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.
we'd like to add claude managed agents (CMA, anthropic's sessions API for server-hosted agents) as a harness option.
given this is a meaty change, proposing the code changes directly and including what i would have otherwise included in adr in pr description.
why add another claude harness
qm runs on a brain/hands split: the model reasons somewhere, and tools run on the user's own durable sandbox. every harness so far is a local loop that wasn't designed for that split, so qm makes it work by wrapping the loop and swapping its tools for bridged ones. CMA's harness outside sandbox architecture fits qm's architecture natively. the brain is a hosted session on anthropic's servers, the hands are the user's sandbox, and tool calls come back to qm to run there, with the user's credentials, under the same command policy and approvals as the other harnesses. Claude is able to use its native bash tool, and it executes on the user's sandbox through the same bridged execute path.
advantages of cma
reliability comes from the split architecture itself. the conversation lives in the session store on anthropic's side and tools run in qm's sandbox, so there's no in-process loop to lose: a redeploy of qm mid-task can't drop the conversation, and a turn sends just one new message instead of the whole history. performance comes from the model working with its own tools: claude uses its own bash tool rather than a stand-in like the claude code harness needs to use. the adapter is just an http client, so there's no harness runtime to operate. and every session has a live trace in the claude console, which makes debugging an agent much easier.
tradeoffs
the API is beta. changing the model, effort, or system prompt rotates the session, reseeded from qm's log so nothing is lost. steering queues between turns. and the conversation exists on both sides, since qm's log is the source of truth.
testing & verification
tests mock the CMA API at the http boundary and cover turn flow, resume and rotation, strict gate on both tool routes, work-queue lease, aborts, and retries. qm check verifies the environment and its key against the live API before any deploy.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.