Pre-flight Checks
Bug Description
When or MCP is called without the flag, sessions are created with (empty string) instead of falling back to the current working directory.
This affects 3 locations in the codebase:
| Location |
Function |
Directory Source |
| cmd/engram/main.go:876 |
cmdSave |
Hardcoded "" |
| internal/mcp/mcp.go:792 |
handleSave |
Hardcoded "" (ignores detRes.Path) |
| internal/mcp/mcp.go:1228 |
handleSessionStart |
Request arg only (ignores detRes.Path) |
The infrastructure exists to detect the correct directory via which returns , but this value is never used for session creation.
Steps to Reproduce
- Run without
- Check — it's empty ("")
- Run — fails with "session payload directory is required"
Expected Behavior
When is not specified, session creation should fall back to or use from .
Actual Behavior
Session created with — causes sync failures downstream.
Environment
- Engram Version: 1.13.1
- Agent: OpenCode / any MCP agent
Proposed Fix
Add fallback in all 3 locations:
Related Issues
Tags
Pre-flight Checks
Bug Description
When or MCP is called without the flag, sessions are created with (empty string) instead of falling back to the current working directory.
This affects 3 locations in the codebase:
The infrastructure exists to detect the correct directory via which returns , but this value is never used for session creation.
Steps to Reproduce
Expected Behavior
When is not specified, session creation should fall back to or use from .
Actual Behavior
Session created with — causes sync failures downstream.
Environment
Proposed Fix
Add fallback in all 3 locations:
Related Issues
Tags