Repository navigation
Replies: 5 comments
|
Guys, this is trivial. Come on. I'll have my clanker post my usecase here. |
Use case: an Action that copies the current thread to the clipboard as Markdown, at a few detail levels (my messages; + agent replies; + tool calls; + tool output). Scope: only @juliusmarminge, would you approve that scope? |
|
An addendum: Codex has a similar feature with the |
|
Adding a use case from the agent side: per-thread state in a CLI the agent runs. We run T3 as a hosted service. There, agents drive a shared browser through a CLI that picks its session from an environment variable. Each thread should get its own browser window, so every process a thread's agent starts needs to know which thread it belongs to. Today nothing carries that. No thread identity reaches agent processes, the commands they run, or terminals. We've run this downstream on 0.1.0 for a while, and the part that looked hard turned out to be easy:
The scope we'd suggest, in this order:
What it wouldn't do:
Processes not tied to one thread should drop an inherited value, as Pi already does for Known gaps:
Would you be OK with that scope, or with step 1 alone to start? Happy to test a candidate on our setup. |
|
+1 to the scope @immakermatty proposed. Two additions from a setup with several linked machines: Status in 0.1.4: Claude sessions already get An environment id is needed too. With linked environments, a thread id alone doesn't say which machine the thread lives on. A link to the thread needs both ids ( Our use case: tracing commits and PRs to the agent thread that made them.
This needs the variables in every command an agent runs, git hooks included, for every provider, which is exactly what the proposed scope covers. An agent account ( |
Uh oh!
There was an error while loading. Please reload this page.
Before submitting
Area
apps/server
Problem or use case
I want to have information about current thread in environment variables: both for terminal and running agent sessions.
Proposed solution
Provide environment variables along project and thread scoped child processes (terminal and harness):
T3CODE_PROJECT_ROOT(currently available only in terminal - make available everywhere)T3CODE_WORKTREE_PATH(currently available only in terminal, if worktree is used - make available everywhere)T3CODE_PROJECT_ID(add new)T3CODE_THREAD_ID(add new)T3CODE_HOME- always provide resolved path - canonical valueCool ideas for future, but out of scope:
T3CODE_ORIGIN- accessible server hostT3CODE_TOKEN- short living scoped token that allows controlling only threads in current project or something like thisWhy this matters
Cool automation opportunities - like using custom CLI (see references) that allows agent to create threads in t3code, control them.
Smallest useful scope
Adding those two:
T3CODE_PROJECT_IDT3CODE_THREAD_IDAlternatives considered
Using cwd as context, but can't detect thread reliable this way.
Risks or tradeoffs
Claude relying on
T3*env variables presence to detect it's running under t3code?Examples or references
Currently t3code provides two environment variables in terminal:
T3CODE_PROJECT_ROOT,T3CODE_WORKTREE_PATH.#2921
https://github.com/kcosr/t3code-threads
https://github.com/tarik02/t3code-cli
Contribution
All reactions