Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[Bug]: API-created workspace initial prompt replies "Not logged in · Please run /login"

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

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
45/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
冷清
技术栈
macos

调研方向

首先复现本地 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,通用步骤见我们的新手贡献指南。

从这里开始

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

beyondcode/polyscope-community 的其他 Issue

查看 beyondcode/polyscope-community 的全部 Issue

相似的 Issue

更多 Backend & API Design Issue

把新 issue 发到你的邮箱

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