flue run appears to terminate local agent runs after ~300 seconds if the agent is inside a long-running tool call that does not emit Flue-level SSE events before completing.
This shows up as:
[flue] Agent error: terminated
The tool’s own timeout can be much higher than 300s, but the run still terminates around the 300s mark.
Minimal repro
Create a Flue agent that runs a long shell command:
import type { FlueContext } from '@flue/sdk/client';
import { defineCommand } from '@flue/sdk/node';
export const triggers = {};
const bash = defineCommand('bash');
export default async function (ctx: FlueContext<unknown>) {
const { init } = ctx;
const agent = await init({
sandbox: 'local',
commands: [bash],
});
const session = await agent.session('long-bash-probe');
return await session.shell(
"bash -lc 'sleep 360; echo done'",
{
timeout: 480,
commands: [bash],
},
);
}
Then run:
flue run long-bash-probe \
--target node \
--id long-bash-probe \
--workspace .flue \
--output /tmp/flue-long-bash-probe
Observed behavior
A 240s sleep succeeds:
session.shell("bash -lc 'sleep 240; echo done'", {
timeout: 360,
commands: [bash],
});
Result:
A 360s sleep fails at roughly 301 seconds:
session.shell("bash -lc 'sleep 360; echo done'", {
timeout: 480,
commands: [bash],
});
Result:
[flue] Agent error: terminated
My interpretation of what's happening here is that the SSE server used in flue has a default timeout of 300s which isn't directly overrideable, and there isn't any continuous keepalive.
P.S. Great work on flue! I love the abstraction here, and super excited to start driving more usage with it! And I'm happy to contribute a fix to this, but would love to discuss what authors/maintainers the preferred approach :)
flue runappears to terminate local agent runs after ~300 seconds if the agent is inside a long-running tool call that does not emit Flue-level SSE events before completing.This shows up as:
The tool’s own timeout can be much higher than 300s, but the run still terminates around the 300s mark.
Minimal repro
Create a Flue agent that runs a long shell command:
Then run:
Observed behavior
A 240s sleep succeeds:
Result:
A 360s sleep fails at roughly 301 seconds:
Result:
My interpretation of what's happening here is that the SSE server used in flue has a default timeout of 300s which isn't directly overrideable, and there isn't any continuous keepalive.
P.S. Great work on flue! I love the abstraction here, and super excited to start driving more usage with it! And I'm happy to contribute a fix to this, but would love to discuss what authors/maintainers the preferred approach :)