JetBrains / JetBrains/junie

Junie cli incorrect session ID reported by --output-format json

Open
#31 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Shell
Stars
440
Forks
33
Avg merge
4h 43m
Merged PRs (30d)
7

Description

# What
```
◉ nora[v0.5.3] 📁 projects (222) ❯ junie "do nothing and exit" --output-format=json
{"sessionId":"session-260408-000616-51s5","taskName":"No-Operation Exit Task","result":"The issue description requested to do nothing and exit, which has been fulfilled.","changes":[],"llmUsage":[{"model":"gemini-3-flash-preview","calls":1,"cost":0.003116,"inputTokens":5476,"cacheInputTokens":0,"cacheCreateTokens":0,"outputTokens":126},{"model":"gpt-5-2025-08-07","calls":1,"cost":0.0015325,"inputTokens":554,"cacheInputTokens":0,"cacheCreateTokens":0,"outputTokens":84},{"model":"gpt-4.1-2025-04-14","calls":1,"cost":9.2E-4,"inputTokens":192,"cacheInputTokens":1024,"cacheCreateTokens":0,"outputTokens":3},{"model":"gpt-4.1-mini-2025-04-14","calls":3,"cost":2.7519999999999997E-4,"inputTokens":612,"cacheInputTokens":0,"cacheCreateTokens":0,"outputTokens":19}]}
◉ nora[v0.5.3] 📁 projects (222) ❯ tail -n 1 ~/.junie/sessions/index.jsonl
{"sessionId":"session-260408-000616-1lkd","createdAt":1775570776078,"updatedAt":1775570779787,"projectDir":"/Users/simonmittag/projects","taskName":"No-Operation Exit Task"}
```

Junie reports a different sessonID to the one in the sessions log. I can't resume the sessionID junie returns because it doesn't exist. I need the cli to append to a previous session to preserve context

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the issue with `junie "do nothing and exit" --output-format=json`, then compare its reported sessionId with the last entry in `~/.junie/sessions/index.jsonl`. Trace the session creation and JSON output paths; done means the reported ID matches the sessions log and the session can be resumed to preserve context.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.