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

未关闭
#71 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
bash, typescript
领域
backend, cli, desktop

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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

主要语言
TypeScript
星标
199
派生
10
平均合并
1 分钟
30 天内合并 PR
15

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

open-webui/tether 的其他 Issue

查看 open-webui/tether 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。