@@ -45,7 +45,6 @@ type Mysis struct {
4545 lastError error
4646 currentAccountUsername string
4747 currentPassword string // Password for current account
48- currentSessionID string // Active session_id from login/register
4948 activityState ActivityState
5049 activityUntil time.Time
5150 lastServerTick int64
@@ -199,13 +198,6 @@ func (m *Mysis) CurrentPassword() string {
199198 return m.currentPassword
200199 }
201200
202-// CurrentSessionID returns the active session_id.
203-func (m *Mysis) CurrentSessionID() string {
204- m.mu.RLock()
205- defer m.mu.RUnlock()
206- return m.currentSessionID
207-}
208-
209201 // ActivityState returns the mysis current activity.
210202 func (m *Mysis) ActivityState() ActivityState {
211203 a := m
@@ -1127,8 +1119,7 @@ func (m *Mysis) executeToolCall(ctx context.Context, mcpProxy *mcp.Proxy, tc pro
11271119 }
11281120 json.Unmarshal(tc.Arguments, &args)
11291121
1130- // Extract session_id and password from tool result
1131- sessionID := extractSessionID(result)
1122+ // Extract password from tool result
11321123 password := args.Password
11331124
11341125 // For register, password might be in result instead of args
@@ -1142,8 +1133,8 @@ func (m *Mysis) executeToolCall(ctx context.Context, mcpProxy *mcp.Proxy, tc pro
11421133 actualUsername = args.Username // Fallback to requested username
11431134 }
11441135
1145- if actualUsername != "" && sessionID != "" {
1146- a.setCurrentAccount(actualUsername, password, sessionID)
1136+ if actualUsername != "" {
1137+ a.setCurrentAccount(actualUsername, password)
11471138
11481139 // Rebuild system prompt with new credentials
11491140 if err := a.rebuildSystemMemory(); err != nil {
@@ -1163,7 +1154,7 @@ func (m *Mysis) executeToolCall(ctx context.Context, mcpProxy *mcp.Proxy, tc pro
11631154 return result, err
11641155 }
11651156
1166-func (m *Mysis) setCurrentAccount(username, password, sessionID string) {
1157+func (m *Mysis) setCurrentAccount(username, password string) {
11671158 m.mu.Lock()
11681159 storeRef := m.store
11691160
@@ -1179,7 +1170,6 @@ func (m *Mysis) setCurrentAccount(username, password, sessionID string) {
11791170
11801171 m.currentAccountUsername = username
11811172 m.currentPassword = password
1182- m.currentSessionID = sessionID
11831173 m.mu.Unlock()
11841174
11851175 if storeRef != nil {
@@ -1199,27 +1189,6 @@ func (m *Mysis) releaseCurrentAccount() {
11991189 }
12001190 m.currentAccountUsername = ""
12011191 m.currentPassword = ""
1202- m.currentSessionID = ""
1203-}
1204-
1205-// extractSessionID extracts session_id from tool result content
1206-func extractSessionID(result *mcp.ToolResult) string {
1207- if result == nil || result.IsError {
1208- return ""
1209- }
1210-
1211- for _, block := range result.Content {
1212- if block.Type == "text" {
1213- // Parse JSON from text block
1214- var data map[string]interface{}
1215- if err := json.Unmarshal([]byte(block.Text), &data); err == nil {
1216- if sessionID, ok := data["session_id"].(string); ok {
1217- return sessionID
1218- }
1219- }
1220- }
1221- }
1222- return ""
12231192 }
12241193
12251194 // extractPassword extracts password from tool result (for register responses)
@@ -1592,7 +1561,7 @@ func (m *Mysis) findLastUserPromptIndex(memories []*store.Memory) int {
15921561 // Rationale:
15931562 // - Multi-step tool calling (login → get_status → get_notifications) requires complete tool history
15941563 // - Historical turns can be compressed without breaking current reasoning
1595-// - Preserves session_id and other tool results from within the current turn
1564+// - Preserves tool results from within the current turn
15961565 // - Prevents orphaned tool calls by keeping complete tool loops together
15971566 //
15981567 // Example context for multi-step turn:
@@ -1601,8 +1570,8 @@ func (m *Mysis) findLastUserPromptIndex(memories []*store.Memory) int {
16011570 // {role: system, content: "You are Mysis Alpha..."},
16021571 // {role: user, source: direct, content: "Check ship status"},
16031572 // {role: assistant, content: "[TOOL_CALLS]call_1:login:{}"},
1604-// {role: tool, content: "call_1:session_id: abc123"},
1605-// {role: assistant, content: "[TOOL_CALLS]call_2:get_status:{\"session_id\":\"abc123\"}"},
1573+// {role: tool, content: "call_1:Login successful"},
1574+// {role: assistant, content: "[TOOL_CALLS]call_2:get_status:{}"},
16061575 // {role: tool, content: "call_2:Ship health: 100%"}
16071576 // ]
16081577 func (m *Mysis) getContextMemories() ([]*store.Memory, bool, error) {
@@ -1966,10 +1935,9 @@ func (m *Mysis) buildSystemPrompt() string {
19661935 accountDetails := constants.AccountDetailsFallback
19671936 username := m.CurrentAccountUsername()
19681937 password := m.CurrentPassword()
1969- sessionID := m.CurrentSessionID()
19701938
1971- if username != "" && sessionID != "" {
1972- accountDetails = fmt.Sprintf(constants.AccountDetailsTemplate, username, password, sessionID)
1939+ if username != "" {
1940+ accountDetails = fmt.Sprintf(constants.AccountDetailsTemplate, username, password)
19731941 }
19741942
19751943 prompt = strings.Replace(prompt, "{{ACCOUNT_DETAILS}}", accountDetails, 1)