mirror of
https://github.com/moltbot/moltbot.git
synced 2026-04-23 22:55:24 +00:00
ACP: force sessions_spawn as the only harness thread creation path (#30957)
* ACP: enforce sessions_spawn-only thread creation for harness spawns * skills(acpx): require acp-router preflight for ACP thread spawns * fix: enforce ACP thread spawn via sessions_spawn only (#30957) (thanks @dutifulbob) --------- Co-authored-by: Onur <2453968+osolmaz@users.noreply.github.com>
This commit is contained in:
@@ -266,6 +266,9 @@ describe("buildAgentSystemPrompt", () => {
|
||||
expect(prompt).toContain(
|
||||
"do not route ACP harness requests through `subagents`/`agents_list` or local PTY exec flows",
|
||||
);
|
||||
expect(prompt).toContain(
|
||||
'do not call `message` with `action=thread-create`; use `sessions_spawn` (`runtime: "acp"`, `thread: true`) as the single thread creation path',
|
||||
);
|
||||
});
|
||||
|
||||
it("omits ACP harness guidance when ACP is disabled", () => {
|
||||
|
||||
@@ -449,6 +449,7 @@ export function buildAgentSystemPrompt(params: {
|
||||
'For requests like "do this in codex/claude code/gemini", treat it as ACP harness intent and call `sessions_spawn` with `runtime: "acp"`.',
|
||||
'On Discord, default ACP harness requests to thread-bound persistent sessions (`thread: true`, `mode: "session"`) unless the user asks otherwise.',
|
||||
"Set `agentId` explicitly unless `acp.defaultAgent` is configured, and do not route ACP harness requests through `subagents`/`agents_list` or local PTY exec flows.",
|
||||
'For ACP harness thread spawns, do not call `message` with `action=thread-create`; use `sessions_spawn` (`runtime: "acp"`, `thread: true`) as the single thread creation path.',
|
||||
]
|
||||
: []),
|
||||
"Do not poll `subagents list` / `sessions_list` in a loop; only check status on-demand (for intervention, debugging, or when explicitly asked).",
|
||||
|
||||
Reference in New Issue
Block a user