You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] Notification Title Shows Stale Project Name After cd in Session #736
The projectName variable used in desktop notification titles is evaluated once at module load time via basename(process.cwd()). If the user changes directory during a session (which Nanocoder supports), the notification title will continue showing the original directory name for the rest of the session instead of the current one.
Environment
OS: macOS or Linux (any platform with notifications enabled)
Node version: Any
Nanocoder version: Latest
Provider: Any
Model: Any
Steps to Reproduce
Start Nanocoder in directory /home/user/project-a.
Enable desktop notifications in preferences.
Use the /cd command (or equivalent) to change into /home/user/project-b.
Trigger a notification (e.g., let an agent complete a generation).
Observe the notification title still reads "Response Ready in project-a".
Expected Behavior
The notification title should reflect the current working directory at the
time the notification fires, e.g., "Response Ready in project-b".
Actual Behavior
The notification title shows the directory name from when the module was first
loaded, not the current one.
Logs/Screenshots
N/A
Additional Context
Fix: replace the module-level const projectName = basename(process.cwd()) with an inline call basename(process.cwd()) inside each title string in EVENT_MESSAGES, or compute it lazily inside sendNotification().
Note: This issue is intentionally kept small and is suitable for first-time contributors. If you're interested in working on it, please leave a comment below and ask to be assigned before opening a pull request.
I have searched existing issues to ensure this is not a duplicate
I can reproduce this issue consistently
This issue occurs with the latest version of nanocoder
Hi @akramcodez, I'd like to work on this. My approach is simple as right now projectName only gets read once when the app first starts, so if you /cd somewhere else, the notification still shows the old folder name. Proposed fix is just to grab the folder name fresh each time a notification actually goes out, instead of storing it once at the start
Activity
MsadafK commentedon Aug 1, 2026
Hi @akramcodez , I would like to work on this issue. Please assign it to me!
DeepamJha commentedon Aug 1, 2026
Hi @akramcodez, I'd like to work on this. My approach is simple as right now projectName only gets read once when the app first starts, so if you /cd somewhere else, the notification still shows the old folder name. Proposed fix is just to grab the folder name fresh each time a notification actually goes out, instead of storing it once at the start
fix: compute project name lazily for notification titles Removes the …
chore: fill in changeset for Nano-Collective#736 fix
chore: fill in changeset for #736 fix