@@ -127,7 +127,7 @@ General:
127127- ` /repo <keyword> ` - fuzzy match projects; switch if only one match, otherwise list candidates
128128- ` /repo recent ` - show recent projects for the current chat
129129- ` /repo - ` - switch back to the previous project
130- - ` /new ` - close current session and start fresh on the next message
130+ - ` /new ` - clear the saved Codex conversation for the current project and start fresh on the next message
131131- ` /exec <task> ` - force a one-off ` codex exec `
132132- ` /auto <task> ` - force a one-off ` codex exec --full-auto `
133133- ` /plan <task> ` - ask Codex for a plan only, without direct file modification intent
@@ -167,6 +167,7 @@ Telegram adaptation notes:
167167- ` /exec ` behaves like ` codex exec "task" `
168168- ` /auto ` behaves like ` codex exec --full-auto "task" `
169169- ` /new ` is implemented by the bot and resets the current chat session
170+ - ` /new ` only clears the current project's saved Codex conversation slot
170171- ` /status ` is implemented by the bot and reports local runtime state
171172- ` /repo ` is implemented by the bot and switches the per-chat working directory inside ` WORKSPACE_ROOT `
172173- ` /skill ` is implemented by the bot and keeps per-chat skill switches in runtime state
@@ -186,6 +187,16 @@ PTY output is streamed with throttled `editMessageText` updates.
186187 - quote block (if ` REASONING_RENDER_MODE=quote ` )
187188- If ` node-pty ` cannot spawn on the current host, the runner falls back to ` codex exec ` for per-request execution
188189
190+ ## Project-Scoped Conversation State
191+
192+ Conversation state is now tracked per ` chat + project ` , not just per chat.
193+
194+ - When you switch with ` /repo <name> ` , the bot keeps that project's last Codex session id in runtime state
195+ - When you switch back to the same project later, the next plain-text task resumes that project's Codex conversation
196+ - ` /new ` clears only the current project's saved conversation slot; other projects in the same Telegram chat are untouched
197+ - ` /exec ` , ` /auto ` , and ` /plan ` stay one-off by design and do not replace the saved project conversation
198+ - On hosts where PTY is unavailable, project restore still works through ` codex exec resume `
199+
189200## Event-Driven Automation
190201
191202` node-cron ` is built in for proactive behavior:
@@ -278,7 +289,7 @@ Telegram can manage runtime usage of Bot-side MCP and skills, but not install ar
278289- MCP servers are process-level runtime resources: list, inspect, reconnect, enable, disable
279290- Skills are chat-level routing switches: each chat can enable or disable ` github ` and ` mcp ` independently
280291- Codex's own MCP remains separate and is not managed through these bot commands
281- - Runtime state is persisted to ` STATE_FILE ` , so ` /mcp enable|disable ` and ` /skill on|off ` survive bot restarts
292+ - Runtime state is persisted to ` STATE_FILE ` , so ` /mcp enable|disable ` , ` /skill on|off ` , and per-project Codex conversation slots survive bot restarts
282293
283294## Troubleshooting
284295
0 commit comments