(directory, client, sessionID)
| 1510 | { sessionID, command }, |
| 1511 | ) |
| 1512 | return { startsAssistantTurn: true } |
| 1513 | } |
| 1514 | const prompt = await buildPrompt(directory, job) |
| 1515 | const prefix = kind === "goal" |
| 1516 | ? "EXPERIMENTAL GOAL MODE CONTINUATION. Continue pursuing the active goal. Do not explain the /loop-goal command. Use the goal tools only when progress/completion/block state is real." |
| 1517 | : "AUTONOMOUS OPENCODE LOOP ITERATION. Continue the configured task now. Do not explain the /loop command. Do not search for documentation about this plugin. Do not create scheduler files. Do not ask questions. Make reasonable assumptions and work directly." |
| 1518 | const promptText = `${prefix} |
| 1519 | |
| 1520 | ${prompt}` |
| 1521 | guardLoopOwnedUserMessage(sessionID) |
| 1522 | fireSdk( |
| 1523 | client, |
| 1524 | "session.prompt", |
| 1525 | client.session.prompt.bind(client.session), |
no test coverage detected