revert prompt-too-long fallback and keep inline directives
This commit is contained in:
@@ -684,7 +684,6 @@ export async function runCommandReply(
|
||||
if (stderr?.trim()) {
|
||||
logVerbose(`Command auto-reply stderr: ${stderr.trim()}`);
|
||||
}
|
||||
const promptTooLong = rawStdout.includes("prompt is too long");
|
||||
|
||||
const logFailure = () => {
|
||||
const truncate = (s?: string) =>
|
||||
@@ -703,21 +702,6 @@ export async function runCommandReply(
|
||||
);
|
||||
};
|
||||
|
||||
if (promptTooLong) {
|
||||
const text =
|
||||
"⚠️ Session history is too long. Starting a fresh session — please resend your last message.";
|
||||
const meta: CommandReplyMeta = {
|
||||
durationMs: Date.now() - started,
|
||||
queuedMs,
|
||||
queuedAhead,
|
||||
exitCode: code,
|
||||
signal,
|
||||
killed,
|
||||
agentMeta: { extra: { promptTooLong: true } },
|
||||
};
|
||||
return { payloads: [{ text }], meta };
|
||||
}
|
||||
|
||||
const parsed = trimmed ? agent.parseOutput(trimmed) : undefined;
|
||||
|
||||
// Collect assistant texts and tool results from parseOutput (tau RPC can emit many).
|
||||
|
||||
Reference in New Issue
Block a user