You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to write a wiki page. I need to define my own safe output job to do that. However, it has started failing because the content exceeds a limit and I get a message that content is written to a file instead of the content I want. I'm attempting to work around this issue.
// Handle case where body exceeded the framework's inline size limit
// and was saved to a separate file in /tmp/gh-aw/safeoutputs/
const largeContentPrefix = '[Content too large, saved to file: ';
if (body.startsWith(largeContentPrefix) && body.endsWith(']')) {
const filename = body.slice(largeContentPrefix.length, -1);
const contentFilePath = path.join('/tmp/gh-aw/safeoutputs', filename);
if (!fs.existsSync(contentFilePath)) {
core.setFailed(`Referenced content file not found: ${contentFilePath}`);
return;
}
body = fs.readFileSync(contentFilePath, 'utf8');
core.info(`Resolved body from external file (${body.length} bytes)`);
}
Checking for text Content too large, saved to file feels very brittle.
Activity
JamesNK commentedon Apr 28, 2026
I think I've fixed this by changing the incoming body to be a file reference.