[Bug]: API-created workspace initial prompt replies "Not logged in · Please run /login"
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 45/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- macos
- 领域
- api, authentication
调研方向
首先复现本地 POST /api/repos/{repositoryId}/worktrees 流程,然后在桌面应用已完成身份验证的情况下,通过本地 websocket 发送 agent.prompt。比较手动创建的 workspace 与通过 API 创建的 workspace 之间的身份验证和初始化。完成标准是:通过 API 创建的 workspace 能够可靠地接受其初始 prompt,且不会出现 /login 或重试时序问题。
由索引模型根据 Issue 内容生成。
描述
Platform
macOS
Operating system version
macOS 26.5.2 build 25F84
System architecture
ARM64 (M1, M2, etc)
PolyScope Version
0.26.0
Bug description
When creating a workspace through the local Polyscope REST API and then sending the initial prompt over the local Polyscope websocket, the prompt sometimes fails with:
Not logged in · Please run /login
The workspace itself is created successfully, but the initial agent prompt is rejected as unauthenticated.
This happens even though Polyscope is open and authenticated for normal/manual workspace usage.
Request Flow
Workspace creation:
POST http://127.0.0.1:4321/api/repos/{repositoryId}/worktrees
Accept: application/json
Content-Type: application/json
Payload:
{
"branch": "dev/example-task",
"name": "dev/example-task"
}
The prompt is then sent over the local websocket:
{
"type": "agent.prompt",
"worktreeId": "{worktreeId}",
"prompt": "{initial prompt text}"
}
Polyscope replies with:
Not logged in · Please run /login
Expected Behavior
If the Polyscope desktop app is already authenticated and manual prompting works, API-created workspaces should be able to receive the initial prompt without requiring /login.
Actual Behavior
The workspace is created, but the initial prompt fails with:
Not logged in · Please run /login
Notes
I added retries on my side because this initially looked like a transient timing issue immediately after workspace creation. The error still surfaces enough that it seems like either:
- the API/websocket-created agent session is not inheriting the app's authenticated state, or
- Polyscope is accepting the prompt before the workspace agent/auth state is fully initialized.
This is separate from the cloud API. Workspace creation and prompting are both going through the local Polyscope desktop API/server.
Steps to reproduce
No response
Relevant log output
- 主要语言
- 没有语言数据
- 星标
- 20
- 派生
- 0
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
beyondcode/polyscope-community 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
-
难度 4/5 3-5 天 新手友好度 45/100
-
难度 4/5 3-5 天 新手友好度 38/100
beyondcode/polyscope-community#198 · 1 条评论 · 1 个 reaction ·
-
难度 4/5 3-5 天 新手友好度 52/100
-
enhancement
难度 5/5 一周以上 新手友好度 35/100
beyondcode/polyscope-community#189 · 1 条评论 · 2 个 reaction ·
查看 beyondcode/polyscope-community 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 2 天内回复
-
bug No Code Attached Yet
难度 2/5 1-3 小时 新手友好度 88/100
joomla/joomla-cms#48556 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 85/100
modelscope/FunASR#3757 ·
维护者通常 1 天内回复
-
component:midnight-node status:untriaged
难度 1/5 1 小时以内 新手友好度 90/100
midnightntwrk/midnight-node#2235 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 90/100
langflow-ai/langflow#15535 ·
维护者通常 1 天内回复