[0.1.16] [Linux 7.3.4-arch1-1] The agent's shell is dash, and it's been quietly breaking my environment

Aperta
#71 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
bash, typescript
Ambito
backend, cli, desktop

Direzione di ricerca

The issue describes four related problems in run_command, the terminal tool manifest, prompt caching, and terminal session timeouts, but names no source files or tests. Start by locating those entry points and tracing how shell environments, dynamic tools, cache keys, and terminal session lifetimes are handled. Done means the reported behaviors have a defined resolution and are covered by appropriate checks; the issue itself leaves the implementation and expected behavior open.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Version

0.1.16

Platform

Linux 7.3.4-arch1-1

Description

Hello,

I ran into the issues below, which cost me a few hours of debugging. Documenting it in case others encounter the same behavior.

Issue 1 — run_command runs the wrong shell

run_command executes under dash, not the user's login shell (bash), and doesn't source their rc (~/.bashrc). On top of that, the tether app filters out the user's custom UV_* envs. So any command run through it operates on a different environment than the user's terminal — missing PATH entries, aliases, exports. The agent silently produces wrong results (e.g. "command not found" or the wrong interpreter) with no error explaining why.
Repro: user has an export/alias in bashrc; run_command 'echo $MY_VAR' → empty, while the same in the user terminal works.
The UV_* part is worth calling out on its own: dash loads some of the user environment, but the app filters out the UV_* ones specifically. "Some envs load, but not those" looks like it's working right up until it very much isn't, which is what made it so hard to pin down. — hours of user troubleshooting.
And since dash can't source bashrc, the agent can't pick up mise tooling or reproduce a CI/CD environment at all. Anything depending on that setup just silently fails from the agent's side.

Issue 2 — the tool appears/disappears on UI state

read_user_terminal / send_user_terminal_input is not in the agent's tool manifest until the user opens the terminal in the UI. There's no signal distinguishing "tool doesn't exist" from "tool not available right now." Consequence: the agent confidently asserts a capability is absent, then contradicts itself once the tool appears. I had the enjoyable experience of watching it tell me a tool didn't exist, then change its mind later.

Issue 3 — dynamic tools invalidate the prompt-cache prefix

Tools are serialized at the front of the request (system + tools + messages). Caching keys on that prefix. If the tool list mutates mid-conversation (terminal opened → tool added/removed), the prefix hash changes → full cache miss for the whole conversation, so every subsequent turn re-processes the entire prefix at full cost/latency. A UI toggle thus has a backend cost + latency side effect the user never sees.

Issue 4 — the terminal UI times out

The terminal view drops its session after a period. When it does, the agent loses read_user_terminal / send_user_terminal_input mid-task and the working environment disappears out from under it. This compounds Issue 2: the tool vanishes for a reason the agent can't observe, and a long-running task can get stranded halfway through with no hint as to why.


Honestly, all of this collapses into one wish: a single, solid, stable bash tool that reflects the user's real environment. That would make everything above just... work.
No fixes needed on my end — I'm sure you know the right way to wire this up. Just wanted to flag it, since it's the kind of thing that's invisible until it eats someone's afternoon. Thanks for the great work on this — genuinely a joy to use apart from this one sharp edge. 🙂

Steps to reproduce

No response

Additional context

No response

Lingua principale
TypeScript
Stelle
199
Fork
10
Merge medio
1m
PR unite (30g)
15

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di open-webui/tether

Tutte le issue di open-webui/tether

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.