LogoThread Easy
  • 探索
  • 線程創作
LogoThread Easy

Twitter 線程的一站式夥伴

© 2025 Thread Easy All Rights Reserved.

探索

Newest first — browse tweet threads

Keep on to blur preview images; turn off to show them clearly

I just figured out how to really automate my agent workflow even more with some tmux wizardry.

Now that I'm using my mcp agent mail project to get a bunch of agents to talk to each other about implementing a plan (and also coordinating using the beads project for task management), I still need to "feed" the agents by queueing up a bunch of messages in codex to keep them busy.

This involves going one by one through the various tmux panes (one for each codex instance) and pasting in some canned messages or hitting the up arrow a few times to reuse past messages, such as: 

"Pick the next bead you can actually do usefully now and start coding on it immediately; communicate what you're doing to the other agents via agent mail."

It feels a bit silly and inefficient to be doing this, even though it doesn't take that long to give each agent enough instructions to keep them busy for over an hour. 

But now I realized I can automatically queue up a bunch of messages in every relevant tmux pane at once, simply by copying and pasting this into the console outside of the tmux session (this is tested and working in zsh):

---

PANES=(${(f)"$(tmux list-panes -a -F '#S:#I.#P' | tail -n +3 | head -n -2)"})
for pane in $PANES; do
    tmux send-keys -t $pane -l 'pick the next bead you can actually do usefully now and start coding on it immediately; communicate what you'"'"'re doing to the other agents via agent mail.'
    sleep 0.1
    tmux send-keys -t $pane Enter
    
    for i in {1..4}; do
        tmux send-keys -t $pane -l 'keep going, doing useful work! and communicate!'
        sleep 0.1
        tmux send-keys -t $pane Enter
    done
    
    tmux send-keys -t $pane -l 'great, now I want you to carefully read over all of the new code you just wrote and other existing code you just modified with "fresh eyes" looking super carefully for any obvious bugs, errors, problems, issues, confusion, etc.'
    sleep 0.1
    tmux send-keys -t $pane Enter
    
    tmux send-keys -t $pane -l 'Be sure to check your agent mail and to promptly respond if needed to any messages; thereafter proceed meticulously with the plan, doing all of your remaining unfinished tasks systematically and continuing to notate your progress in-line in the plan document, via beads, and via agent mail messages. Don'"'"'t get stuck in "communication purgatory" where nothing is getting done; be proactive about starting tasks that need to be done, but inform your fellow agents via messages when you do so and notate that in-line in the plan document. When you'"'"'re really not sure what to do, pick the next bead that you can usefully work on and get started.'
    sleep 0.1
    tmux send-keys -t $pane Enter
    
    tmux send-keys -t $pane -l 'ok can you now turn your attention to reviewing the code written by your fellow agents and checking for any issues, bugs, errors, problems, inefficiencies, security problems, reliability issues, etc. and carefully diagnose their underlying root causes using first-principle analysis and thereafter fix or revise them if necessary? Dont restrict yourself to the latest commits, cast a wider net and go super deep!'
    sleep 0.1
    tmux send-keys -t $pane Enter
done

---

This script:

Gets panes: Finds all tmux panes, excluding the first 2 and last 2

Sends 8 messages to each selected pane:

"pick the next bead..." 
- tells agents to start working on next task

"keep going..." × 4 - repeated encouragement to continue working

"carefully read over..." - instructs fresh code review

"check agent mail..." - long message about coordination, avoiding communication paralysis, staying productive

"review code written by fellow agents..." - peer code review for bugs/issues

Each message is sent literally (-l flag) with a 0.1 second delay before Enter to ensure the Codex CLI processes them properly.

I just figured out how to really automate my agent workflow even more with some tmux wizardry. Now that I'm using my mcp agent mail project to get a bunch of agents to talk to each other about implementing a plan (and also coordinating using the beads project for task management), I still need to "feed" the agents by queueing up a bunch of messages in codex to keep them busy. This involves going one by one through the various tmux panes (one for each codex instance) and pasting in some canned messages or hitting the up arrow a few times to reuse past messages, such as: "Pick the next bead you can actually do usefully now and start coding on it immediately; communicate what you're doing to the other agents via agent mail." It feels a bit silly and inefficient to be doing this, even though it doesn't take that long to give each agent enough instructions to keep them busy for over an hour. But now I realized I can automatically queue up a bunch of messages in every relevant tmux pane at once, simply by copying and pasting this into the console outside of the tmux session (this is tested and working in zsh): --- PANES=(${(f)"$(tmux list-panes -a -F '#S:#I.#P' | tail -n +3 | head -n -2)"}) for pane in $PANES; do tmux send-keys -t $pane -l 'pick the next bead you can actually do usefully now and start coding on it immediately; communicate what you'"'"'re doing to the other agents via agent mail.' sleep 0.1 tmux send-keys -t $pane Enter for i in {1..4}; do tmux send-keys -t $pane -l 'keep going, doing useful work! and communicate!' sleep 0.1 tmux send-keys -t $pane Enter done tmux send-keys -t $pane -l 'great, now I want you to carefully read over all of the new code you just wrote and other existing code you just modified with "fresh eyes" looking super carefully for any obvious bugs, errors, problems, issues, confusion, etc.' sleep 0.1 tmux send-keys -t $pane Enter tmux send-keys -t $pane -l 'Be sure to check your agent mail and to promptly respond if needed to any messages; thereafter proceed meticulously with the plan, doing all of your remaining unfinished tasks systematically and continuing to notate your progress in-line in the plan document, via beads, and via agent mail messages. Don'"'"'t get stuck in "communication purgatory" where nothing is getting done; be proactive about starting tasks that need to be done, but inform your fellow agents via messages when you do so and notate that in-line in the plan document. When you'"'"'re really not sure what to do, pick the next bead that you can usefully work on and get started.' sleep 0.1 tmux send-keys -t $pane Enter tmux send-keys -t $pane -l 'ok can you now turn your attention to reviewing the code written by your fellow agents and checking for any issues, bugs, errors, problems, inefficiencies, security problems, reliability issues, etc. and carefully diagnose their underlying root causes using first-principle analysis and thereafter fix or revise them if necessary? Dont restrict yourself to the latest commits, cast a wider net and go super deep!' sleep 0.1 tmux send-keys -t $pane Enter done --- This script: Gets panes: Finds all tmux panes, excluding the first 2 and last 2 Sends 8 messages to each selected pane: "pick the next bead..." - tells agents to start working on next task "keep going..." × 4 - repeated encouragement to continue working "carefully read over..." - instructs fresh code review "check agent mail..." - long message about coordination, avoiding communication paralysis, staying productive "review code written by fellow agents..." - peer code review for bugs/issues Each message is sent literally (-l flag) with a 0.1 second delay before Enter to ensure the Codex CLI processes them properly.

Actually, this is a better way to do it, by filtering on the name of the pane (in my case, it's "node" for the codex panes), and it has the initial 0.1 second sleep, without which it skips the first matching pane without sending the messages correctly: PANES=(${(f)"$(tmux list-panes -a -F '#S:#I.#P #{pane_current_command}' | rg ' node$' | cut -d' ' -f1)"}) for pane in $PANES; do sleep 0.1 # Initial sleep to ensure pane is ready tmux send-keys -t $pane -l 'pick the next bead you can actually do usefully now and start coding on it immediately; communicate what you'"'"'re doing to the other agents via agent mail.' sleep 0.1 tmux send-keys -t $pane Enter for i in {1..4}; do tmux send-keys -t $pane -l 'keep going, doing useful work! and communicate!' sleep 0.1 tmux send-keys -t $pane Enter done tmux send-keys -t $pane -l 'great, now I want you to carefully read over all of the new code you just wrote and other existing code you just modified with "fresh eyes" looking super carefully for any obvious bugs, errors, problems, issues, confusion, etc.' sleep 0.1 tmux send-keys -t $pane Enter tmux send-keys -t $pane -l 'Be sure to check your agent mail and to promptly respond if needed to any messages; thereafter proceed meticulously with the plan, doing all of your remaining unfinished tasks systematically and continuing to notate your progress in-line in the plan document, via beads, and via agent mail messages. Don'"'"'t get stuck in "communication purgatory" where nothing is getting done; be proactive about starting tasks that need to be done, but inform your fellow agents via messages when you do so and notate that in-line in the plan document. When you'"'"'re really not sure what to do, pick the next bead that you can usefully work on and get started.' sleep 0.1 tmux send-keys -t $pane Enter tmux send-keys -t $pane -l 'ok can you now turn your attention to reviewing the code written by your fellow agents and checking for any issues, bugs, errors, problems, inefficiencies, security problems, reliability issues, etc. and carefully diagnose their underlying root causes using first-principle analysis and thereafter fix or revise them if necessary? Dont restrict yourself to the latest commits, cast a wider net and go super deep!' sleep 0.1 tmux send-keys -t $pane Enter done

avatar for Jeffrey Emanuel
Jeffrey Emanuel
Sat Nov 08 02:27:10
RT @seclink: 学习一个新东西,就像学游泳,光看理论没用,得下水扑腾。

费曼学习法就是那个帮你“下水扑腾”的好教练,20分钟就能练一次,简单又实用。

第一步:把“知识点”拎出来,说清楚你知道多少

先找个小概念,比如“什么是区块链”“为什么会有通货膨胀”,在纸上写…

RT @seclink: 学习一个新东西,就像学游泳,光看理论没用,得下水扑腾。 费曼学习法就是那个帮你“下水扑腾”的好教练,20分钟就能练一次,简单又实用。 第一步:把“知识点”拎出来,说清楚你知道多少 先找个小概念,比如“什么是区块链”“为什么会有通货膨胀”,在纸上写…

从投资领域转到创业:找工作、找面试题、改简历、模拟面试. 创业(冷启动)|AI , AIGC | 安全技术|RAG | 时空智能 | 认知心理学|智能体 | 生命科学 | 强化学习 I built open source software at https://t.co/b69DXZhcyR

avatar for Y11
Y11
Sat Nov 08 02:25:20
What’s the Japanese word for the sense of sadness when you get home and realize you didn’t finish your morning coffee?

What’s the Japanese word for the sense of sadness when you get home and realize you didn’t finish your morning coffee?

Author (Husk, Crypto Confidential): https://t.co/L2COrV5QA3 Building: https://t.co/HMcbuBhTP3 Teaching: https://t.co/Dy0FsZHQaz

avatar for Nat Eliason
Nat Eliason
Sat Nov 08 02:18:26
It seems like more people prefer the previous design?

It seems like more people prefer the previous design?

Productivity meets minimalism. Building, designing, and sharing my solutions.

avatar for Easlo
Easlo
Sat Nov 08 02:14:04
Which humanoid robot is actually the best? Which is the most capable across the board? 

I understand people may not fully realize it, but the reality is it's the Unitree G1.

It's the Unitree G1... not because it's the best humanoid. 

It's b/c it ships

To people who build.

Which humanoid robot is actually the best? Which is the most capable across the board? I understand people may not fully realize it, but the reality is it's the Unitree G1. It's the Unitree G1... not because it's the best humanoid. It's b/c it ships To people who build.

gpus and tractors Neural networks from Scratch book: https://t.co/hyMkWyUP7R https://t.co/8WGZRkUGsn

avatar for Harrison Kinsley
Harrison Kinsley
Sat Nov 08 02:11:23
RT @hi_antz: @inkdrop_app > As an indie developer, I can’t win by competing the same way large companies do.
The key is to find areas they…

RT @hi_antz: @inkdrop_app > As an indie developer, I can’t win by competing the same way large companies do. The key is to find areas they…

Maker of a tech note-taking app https://t.co/xcprYEEMJQ. My indie dev journey 👉https://t.co/JbdJ58XbTN 🇯🇵@craftzdog Dad👨‍👩‍👧 UTC+9

avatar for Takuya 🐾 devaslife
Takuya 🐾 devaslife
Sat Nov 08 02:11:12
  • Previous
  • 1
  • More pages
  • 488
  • 489
  • 490
  • More pages
  • 2118
  • Next