mirror of
https://github.com/getpaseo/paseo.git
synced 2026-11-11 10:57:07 +00:00
Give agents their own workspace identity through create and resume (#8939)
* fix(server): give agents their workspace id as PASEO_WORKSPACE_ID Agents got PASEO_AGENT_ID and PASEO_AGENT_CWD but not their workspace id, so an agent couldn't rename or archive its own workspace, or name it to create_agent, when several workspaces share its cwd. The launch env now sets PASEO_WORKSPACE_ID whenever the agent has a workspace, including on resume after a daemon restart, where the id now comes from the stored record. OpenCode treats it as a per-session key, so it doesn't force a dedicated server. Refs #5098 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(server): keep the workspace when resuming an agent by handle resume_agent_request matched the stored agent but dropped its workspace id, so the resumed agent had no PASEO_WORKSPACE_ID and no workspace. Pass the matched record's workspace id into the resume. resumeAgentFromPersistence now resolves the workspace once and gives it to both the launch env and the registered agent, so a caller that omits it no longer erases the stored value on the next snapshot. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(server): exercise current daemon creation and permission contracts The workspace resume regression shares this suite with creation checks that still waited for legacy status frames and permission listeners without an owned subscription. Verify the returned error snapshot and acquire event demand so the complete suite can validate workspace identity changes. Co-authored-by: Darrell <DT@Terastar.biz> --------- Co-authored-by: Darrell <DT@Terastar.biz> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
Darrell
parent
ea30d2616a
commit
1efcb31a6c
@@ -598,7 +598,7 @@ Creation request
|
||||
→ resolve defaults and validate provider configuration
|
||||
→ derive launch configuration with Paseo runtime tools and daemon prompt
|
||||
→ agent.open.before hooks (same ordering; env and plugin-local tools and MCP servers)
|
||||
→ set PASEO_AGENT_ID and PASEO_AGENT_CWD
|
||||
→ set PASEO_AGENT_ID, PASEO_AGENT_CWD, and PASEO_WORKSPACE_ID when the agent has a workspace
|
||||
→ open provider session and save agent configuration
|
||||
```
|
||||
|
||||
|
||||
@@ -581,7 +581,7 @@ Creation request
|
||||
→ resolve defaults and validate provider configuration
|
||||
→ derive launch configuration with Paseo runtime tools and daemon prompt
|
||||
→ agent.open.before hooks (same ordering; env and plugin-local tools and MCP servers)
|
||||
→ set PASEO_AGENT_ID and PASEO_AGENT_CWD
|
||||
→ set PASEO_AGENT_ID, PASEO_AGENT_CWD, and PASEO_WORKSPACE_ID when the agent has a workspace
|
||||
→ open provider session and save agent configuration
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user