Commit 7c84b25
fix(runner): prevent Gemini CLI exit 42 on workflow add (#893)
## Summary
- Add `clear_session_ids()` to `GeminiSessionManager` to clear stale
session IDs from disk
- Call it from `mark_dirty()` when workflow changes trigger
reinitialisation
- Prevents exit code 42 crash from resuming invalid session in new CWD
## Test plan
- [x] Unit tests pass (452 passed)
- [x] Ruff lint/format clean
- [ ] Manual test: add workflow mid-Gemini session, verify no crash
Fixes: RHOAIENG-52260
🤖 Generated with [Claude Code](https://claude.com/claude-code)
**Jira:**
[RHOAIENG-52260](https://issues.redhat.com/browse/RHOAIENG-52260)
---------
Co-authored-by: Ambient Code Bot <bot@ambient-code.local>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: ambient-code[bot] <ambient-code[bot]@users.noreply.github.com>1 parent 12ad547 commit 7c84b25
3 files changed
Lines changed: 16 additions & 0 deletions
File tree
- components/runners/ambient-runner
- ambient_runner/bridges/gemini_cli
- tests
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
| 174 | + | |
174 | 175 | | |
175 | 176 | | |
176 | 177 | | |
| |||
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
372 | 372 | | |
373 | 373 | | |
374 | 374 | | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
375 | 388 | | |
376 | 389 | | |
377 | 390 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
| 144 | + | |
144 | 145 | | |
145 | 146 | | |
146 | 147 | | |
| |||
150 | 151 | | |
151 | 152 | | |
152 | 153 | | |
| 154 | + | |
153 | 155 | | |
154 | 156 | | |
155 | 157 | | |
| |||
0 commit comments