fix(coding-agent/task): skipped context file for IRC-enabled subagents
- Skipped writing compact conversation context files when IRC is enabled so subagents avoid using stale markdown snapshots. - In runSubprocess, passed an undefined context file for IRC-enabled paths and kept context file prompting for non-IRC executions.
This commit is contained in:
@@ -563,6 +563,7 @@ export async function runSubprocess(options: ExecutorOptions): Promise<SingleRes
|
||||
|
||||
const lspEnabled = enableLsp ?? true;
|
||||
const ircEnabled = subagentSettings.get("irc.enabled") === true;
|
||||
const contextFileForPrompt = ircEnabled ? undefined : options.contextFile;
|
||||
const skipPythonPreflight = Array.isArray(toolNames) && !toolNames.includes("eval");
|
||||
|
||||
const outputChunks: string[] = [];
|
||||
@@ -1001,7 +1002,7 @@ export async function runSubprocess(options: ExecutorOptions): Promise<SingleRes
|
||||
context: options.context?.trim() ?? "",
|
||||
worktree: worktree ?? "",
|
||||
outputSchema: normalizedOutputSchema,
|
||||
contextFile: options.contextFile,
|
||||
contextFile: contextFileForPrompt,
|
||||
ircPeers: ircEnabled ? renderIrcPeerRoster(id) : "",
|
||||
ircSelfId: ircEnabled ? id : "",
|
||||
});
|
||||
|
||||
@@ -785,9 +785,11 @@ export class TaskTool implements AgentTool<TSchema, TaskToolDetails, Theme> {
|
||||
};
|
||||
}
|
||||
|
||||
// Write parent conversation context for subagents
|
||||
// Write parent conversation context for subagents. When IRC is available,
|
||||
// subagents should ask live peers instead of reading a stale markdown dump.
|
||||
await fs.mkdir(effectiveArtifactsDir, { recursive: true });
|
||||
const compactContext = this.session.getCompactContext?.();
|
||||
const shouldWriteConversationContext = this.session.settings.get("irc.enabled") !== true;
|
||||
const compactContext = shouldWriteConversationContext ? this.session.getCompactContext?.() : undefined;
|
||||
let contextFilePath: string | undefined;
|
||||
if (compactContext) {
|
||||
contextFilePath = path.join(effectiveArtifactsDir, "context.md");
|
||||
|
||||
Reference in New Issue
Block a user