Repository navigation
Description
Summary
thinkterm cli spawn has no way to create a thread, and when it is pointed at a
workspace string that has no thread entry, it exits 0 and prints the pane id
while producing a window the GUI cannot show. The agent sees success; the user sees
nothing.
Threads are created only by the GUI through the MutateThinkTermTree /
CreateThread RPC. No CLI surface reaches it.
Environment
- ThinkTerm
0.5.1on macOSarm64, GUI + mux on one host - Panes are driven by an agent (omp) through
thinkterm cli
Reproduction
The goal: start a session in a brand-new thread under an existing project.
thinkterm cli spawn --new-window \
--workspace 'thinkterm:project-<project-id>:thread-<id>' \
--cwd "$PWD" -- omp
# -> prints pane id, exit status 0list --json confirms the window and the workspace string:
pane=79 win=13 ws=thinkterm:project-<project-id>:thread-<id>
pane=80 win=13 ws=thinkterm:project-<project-id>:thread-<id>
agent list --json confirms both panes are live agents:
pane=79 state=idle
pane=80 state=idle
Every CLI-visible signal says this worked. In the GUI the window does not appear
at all, because the project tree has no record of that thread:
$ jq '.projects[]|select(.id=="project-<project-id>")|.threads[].name' thinkterm_tree.json
"<thread-a>"
"<thread-b>"
Evidence that this is not a file-level problem
I tried the obvious workaround of adding the record to thinkterm_tree.json
itself, matching the shape and invariants of a real entry
(materialized_workspace_name set, revision incremented). It survived one read:
revision 690
thread-<id> '<new-thread>'
The GUI then rewrote the file and the entry was gone:
revision 691
thread-<id> '<thread-a>'
thread-<id> '<thread-b>'
So the tree is correctly GUI-owned, not a config surface — which is exactly why
there needs to be a supported route.
Two incorrect hypotheses worth recording
The space segment is not the differentiator. Real materialized threads carry no
space segment either:
real: thinkterm:project-<id>:thread-<id>
mine: thinkterm:project-<id>:thread-<id>
Adding :space-<id>: did not register the thread.
workspace_threads.json cannot be used to verify. It is a save-later copy and
lagged reality throughout the investigation, listing only pre-existing threads. The
authoritative sources are list --json for live panes and thinkterm_tree.json
for GUI-registered threads — and only the latter answers "will the user see it".
No CLI or plugin route exists
$ thinkterm cli --help | grep -c thread # 0
$ thinkterm plugin list # only built-in Snippets
$ thinkterm show-keys | grep -c NewThread # 0, not even key-bound
set-tab-title, set-window-title and rename-workspace all act on the window
and none of them register a thread.
One related trap: rename-workspace with a bare name detaches the panes from
the project entirely — ws becomes just the bare name with no project prefix. That is
easy to do while trying to give a thread a display name.
Impact
Any agent that must stage sessions into a specific thread cannot do it, and — more
importantly — cannot detect that it failed. This is the bad failure shape: a
zero exit status, a pane id on stdout, a live process, a correct-looking workspace
string, and an invisible window. The only observer who can tell is the human
looking at the window list.
For an agent-driven tool this is worth closing, because the agent will confidently
report success and the user's first signal is "I don't see them".
Suggested fix
Any one of these would close it:
- A
thinkterm cli threadsubcommand —create --project <id> --name <n>,
list,move <pane>, backed by the existingCreateThreadop. spawn --thread <name|id>that registers the thread in the tree if it does
not exist, instead of only setting the mux workspace string.- Fail loudly. If
spawn --workspaceis given a workspace with no tree entry,
either error out or warn on stderr. This alone would have turned the whole
incident into a one-line message at spawn time. It is the option that matters
most, because it protects every other path too. - At minimum, document that
--workspacesets the mux workspace string only
and does not create a GUI thread.
Workaround
Splitting into a thread the GUI already knows about works and is visible:
thinkterm cli split-pane --pane-id <pane-in-known-thread> --right -- ompCaveat
I could not tell whether this is intended behaviour with a missing guard, or an
unfinished feature — I am reporting the observable behaviour only. Option 3 is
worth doing either way.
Activity
feat(cli): put a program in a thread with spawn --thread
feat(cli): show each pane's thread in cli list
RoversX commentedon Nov 24, 2026
Hi! I think the problem has been fixed. Could you do me a favor and post this project on Hacker News as a Show HN? I’m having trouble with my Hacker News account. I’ve contacted the HN team but haven’t heard back—maybe I’m shadowbanned 😭 Please let me know if you’d be able to do that. Thank you!