# Don't block thread creation when PromptStore fails to initialize \(\#52333\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/4a15e201baffd079c360792eaa28bd46fce91c6f)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 4a15e201baffd079c360792eaa28bd46fce91c6f

Requested commit: 4a15e201baffd079c360792eaa28bd46fce91c6f

Commit: 4a15e201baffd079c360792eaa28bd46fce91c6f

Tree: 67bbf8855524b48c4a1437a64d3d876bbbe2f44a

Author: Richard Feldman

Committer: GitHub

## Message

```
Don't block thread creation when PromptStore fails to initialize (#52333)

NativeAgentServer::connect used `prompt_store.await?` which turned any
PromptStore initialization failure (permission denied, disk issues,
etc.) into a hard connection error, putting the ConversationView into
LoadError state and preventing all new native agent threads from being
created.

Changed to `.log_err()` so the error is logged at ERROR level but thread
creation proceeds with `prompt_store: None`. `NativeAgent::new` already
accepts `Option<Entity<PromptStore>>` and handles `None` gracefully —
user custom prompts won't load but threads still work.

Added a regression test that serializes a stale thread ID, loads the
panel (triggering the "last active thread not found in database"
warning), then dispatches NewThread through the real NativeAgentServer
path and verifies it produces a connected thread.

Release Notes:

- Agent panel now handles filesystem errors more gracefully
```

## Parents

- [03064b953fefbe2f4070f856b64484131d8f6ec9](https://git.cafe/gitcafe/zed/commit/03064b953fefbe2f4070f856b64484131d8f6ec9?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/4a15e201baffd079c360792eaa28bd46fce91c6f?format=markdown)
