Repository navigation
Agents take a different route each time they start an agent in a worktree #2080
Closed
maciej-lech
started this conversation in
Ideas
Replies: 2 comments 2 replies
|
This is such a good write-up, thank you! The experiment table made the problem obvious: the skill gave agents five reasonable routes and no way to pick one. I took all five of your ideas, they're in #2087 (on main now):
tuios worktree new feat/retry --base main --agent claude --detach --prompt 'Add a retry with backoff to the HTTP client.'It returns once the agent has taken the prompt, and exits 1 if it didn't. If you're up for rerunning your three prompts against main, I'd love to see if the routes converge now. If one still wanders, tell me which wording and I'll tighten the skill further. |
2 replies
|
Thank you @Gaurav-Gosain. I will test it soon! |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi! First, thanks for the skill and the agent tooling. Having agents drive tuios on their own is great, and I lean on it every day. 🙂
I ran into something worth sharing, partly as feedback and partly as a question about how you'd like the skill to steer agents.
What happened
I asked Claude Code (in a tuios pane) to "spawn a tuios worktree and session to work on issue N". It ran:
The new session ended up with two panes: the shell from
tuios newand the agent fromstart-agent. Thewtwas my fault, from a rule in my own CLAUDE.md. Thetuios newcame from the core skill: its "Start an agent beside you" row doesn't say thatstart-agent -screates a missing session, so the agent made one first.A week earlier, on v0.12.1, the same request gave one pane. The v0.12.1 core skill had no spawn command, so the agent opened
fleet, sawtuios worktree new <branch> --agent claude --detachfirst, and sent the brief withtuios queue. Since thestart-agentrow joined the core (2c03bb3), the agent finds what it needs there and never opensfleet.A small experiment
I wanted to know if this was a one-off, so I gave three fresh Claude Code sessions (each in a scratch repo, on a
--serverscratch daemon, main at 9d9eb6a) three ways of saying the same thing:I ran that under four versions of my own instructions:
wtfor worktrees"wt+start-agent -s "$TUIOS_SESSION"(lands next to the caller)wt+start-agent -s <new>wt+start-agent -s "$TUIOS_SESSION"worktree new --agent+queuedelegate --isolation worktreetuios --skill fleetfirst"delegate --isolation worktreeworktree new --agent+ask-agent(blocks up to 15 min)delegate --isolation worktreeworktree new --agent+queueOnly the last row was consistent, and only because I spelled out the commands myself.
Why I think it varies
None of these routes is wrong, they're all real features. The agent just has a lot to choose from, and the core gives little to pick with:
fleetas a bare word next tomail,inboxandtasks, so an agent can't tell that it's the place to look.start-agent"beside you". For "in a worktree" the agent either improvises (git/wt+tuios new+start-agent) or searches--helpand--skill alland takes the first thing that fits.fleetoffersworktree new --agent,fananddelegate --isolation worktreewithout saying which one is the default for "one agent, one worktree, one task".start-agent --prompt,queue,ask-agentandsend-agent-messageeach look plausible.Some ideas, if any are useful
Your call entirely. These are just what would have helped in my case:
tuios worktree new <branch> --base <base> --agent claude --detach --json, thentuios queue", plus "tuios --skill fleethasfananddelegate".start-agent: "-screates the session when it does not exist; do not runtuios newfirst, it adds a shell pane." Theleadtopic says the first half already.fleet: worktrees, fan-out, delegate".fleet:worktree new --agentvsfanvsdelegatevsstart-agent, andqueuevsask-agentvssend-agent-message.--promptonworktree new(asfanandstart-agenthave), so the common case is one command and the agent can't get the handoff wrong.Happy to help with any of these, or to rerun the experiment against a draft of the skill if that's useful. And if the variety is intended, I'd love to hear how you picture agents choosing between the routes.
All reactions