How to pass the stdout of a previous CLI task into the next one?

❓ Question

I want to chain agent tasks in a local bash script. For example, task 1: blackbox "generate a database schema" > schema.sql. Then task 2: I want the agent to read that generated schema and write the typescript types.

What I'm not clear on is whether successive calls to the blackbox CLI share a session or memory context if run in the same terminal, or if each each invocation completely stateless and I gotta manually do stuff like cat schema.sql | blackbox "generate TS types". Anyone knows exactly to how state is preserved in CLI workflows?

Posted Apr 29, 2026, 6:49 AM UTC

44
Loading comments…