start_coding_session
Start a new coding session to track changes by providing a description of the work and an optional Git branch name.
Instructions
Start a new coding session for change tracking
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| description | Yes | Description of what will be worked on | |
| branch | No | Git branch for this session |
Implementation Reference
- src/index.ts:283-293 (handler)The handler that processes the 'start_coding_session' tool call, invokes projectConfigService.startCodingSession(), and returns the formatted response with session ID, description, start time, and optional branch.
case 'start_coding_session': const session = await this.projectConfigService.startCodingSession(args.description, args.branch); return { content: [{ type: 'text', text: `Started coding session: ${session.description}\n` + `Session ID: ${session.id}\n` + `Started at: ${session.startTime}` + (session.branch ? `\nBranch: ${session.branch}` : '') }] }; - The SessionInfo interface defining the shape of a session object returned by the tool (id, description, startTime, branch, commitHashes, isActive).
export interface SessionInfo { id: string; description: string; startTime: string; branch?: string; commitHashes: string[]; isActive: boolean; } - src/toolDefinitions.ts:695-707 (registration)Registration of 'start_coding_session' in tool definitions with description and inputSchema requiring 'description' and optional 'branch'.
// Session Management { name: 'start_coding_session', description: 'Start a new AI coding session with automatic change tracking', inputSchema: { type: 'object', properties: { description: { type: 'string', description: 'What this session will accomplish' }, branch: { type: 'string', description: 'Git branch to work on (optional)' } }, required: ['description'] } }, - src/toolDefinitions.ts:1010-1022 (registration)Duplicate registration of 'start_coding_session' in a second tool definitions section, also requiring 'description' with optional 'branch'.
// Session Management { name: 'start_coding_session', description: 'Start a new coding session for change tracking', inputSchema: { type: 'object', properties: { description: { type: 'string', description: 'Description of what will be worked on' }, branch: { type: 'string', description: 'Git branch for this session' } }, required: ['description'] } }, - The startCodingSession method in ProjectConfigService that creates and stores a new session with a unique ID, description, timestamp, and optional branch.
async startCodingSession(description: string, branch?: string): Promise<SessionInfo> { const sessionId = `session_${Date.now()}`; this.currentSession = { id: sessionId, description, startTime: new Date().toISOString(), branch, commitHashes: [], isActive: true }; return this.currentSession; }