[Bug]: API-created workspace initial prompt replies "Not logged in · Please run /login"
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- macos
- Domain
- api, authentication
Research direction
Start by reproducing the local POST /api/repos/{repositoryId}/worktrees flow, then send agent.prompt over the local websocket while the desktop app is authenticated. Compare authentication and initialization between manually created and API-created workspaces. Done means an API-created workspace accepts its initial prompt reliably without /login or retry timing issues.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- No language data
- Stars
- 20
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from beyondcode/polyscope-community
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
beyondcode/polyscope-community#198 · 1 comment · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
beyondcode/polyscope-community#189 · 1 comment · 2 reactions ·
All issues in beyondcode/polyscope-community
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
syfoud/Simulated_Scepter#172 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
crossplane/crossplane#7859 ·
-
bot:ai-assisted component:compact-js status:untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
midnightntwrk/midnight-sdk#403 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
nightscout/nocturne#1379 ·