Mirrored from upstream 1jehuang/jcode — Issue #203 by @DarkPhilosophy
Original state: open
Created: 2026-05-12T18:39:12Z · Updated: 2026-05-15T18:19:04Z
This issue is an auto-mirrored copy. Comments and edits here are local to quangdang46/jcode — do not expect them to propagate upstream.
Summary
I found a few related UX/configuration issues in jcode v0.12.1 that make it hard to control boot instructions, provider availability, and session resume behavior.
1. AGENTS.md / prompt overlays are counted but ignored for OpenAI ChatGPT OAuth mode
Jcode appears to build a system prompt that includes project/global instructions and prompt overlays:
<working_dir>/AGENTS.md
~/.AGENTS.md
<working_dir>/.jcode/prompt-overlay.md
~/.jcode/prompt-overlay.md
The prompt accounting confirms the system prompt size increases after adding ~/.jcode/prompt-overlay.md.
However, with the OpenAI ChatGPT/OAuth provider path, the model does not actually follow those instructions. A minimal marker such as:
IF YOU LOAD THIS PLEASE REPLY "I AM READY NOW NOW NOW x3"
is not respected in a fresh jcode run, even though prompt accounting shows the system prompt grew.
From the v0.12.1 source, the likely cause is in the OpenAI provider path:
let instructions = if is_chatgpt {
Self::chatgpt_instructions_with_selfdev(system)
} else {
system.to_string()
};
chatgpt_instructions_with_selfdev(system) appears to replace the full built system prompt with CHATGPT_INSTRUCTIONS plus only the self-dev section, effectively dropping AGENTS.md / prompt overlay sections for ChatGPT OAuth mode.
Expected behavior
If Jcode loads and counts instruction files/overlays in the built system prompt, all providers should receive them consistently unless there is an explicit documented limitation.
Suggested fix
For ChatGPT OAuth mode, preserve the full system prompt or explicitly merge the generated ChatGPT instructions with all user/project/global instruction sections, not just self-dev.
2. Need a real provider-disable policy, especially for Copilot
Copilot currently appears as an available provider and may be surfaced by automatic/provider discovery when the environment or local credentials contain GitHub-related state. This is surprising if the user does not want Copilot used or shown.
I tried adding a config concept like:
[policy]
disabled_providers = ["copilot"]
but this does not seem to be implemented/enforced in v0.12.1.
Expected behavior
There should be a fail-closed way to disable providers globally or per project, for example:
[policy]
disabled_providers = ["copilot"]
When disabled, the provider should be excluded from:
- provider auto-detection
- provider lists / model routing
jcode login --provider copilot
- any credential/env probing
- failover paths
The current automatic behavior is not logical for users who explicitly do not want a provider to be available.
3. Resume UX: No terminal found. Resume manually: should not force manual resume
There is also a frustrating resume flow where Jcode prints something like:
No terminal found. Resume manually:
This forces the user to manually copy/run a resume command instead of Jcode automatically resuming or attaching to the session.
Expected behavior
If a session can be resumed, Jcode should resume/attach automatically when possible. If terminal launching is unavailable, there should be a non-interactive fallback path that continues in the current context or clearly explains why automatic resume is impossible.
Environment
- Jcode version:
v0.12.1
- OS: Linux x86_64
- Provider observed: OpenAI ChatGPT/OAuth path
Thanks for considering these. The first issue is especially confusing because prompt accounting suggests the overlay is present, but the actual provider request path drops it for ChatGPT mode.
Summary
I found a few related UX/configuration issues in
jcode v0.12.1that make it hard to control boot instructions, provider availability, and session resume behavior.1.
AGENTS.md/ prompt overlays are counted but ignored for OpenAI ChatGPT OAuth modeJcode appears to build a system prompt that includes project/global instructions and prompt overlays:
<working_dir>/AGENTS.md~/.AGENTS.md<working_dir>/.jcode/prompt-overlay.md~/.jcode/prompt-overlay.mdThe prompt accounting confirms the system prompt size increases after adding
~/.jcode/prompt-overlay.md.However, with the OpenAI ChatGPT/OAuth provider path, the model does not actually follow those instructions. A minimal marker such as:
is not respected in a fresh
jcode run, even though prompt accounting shows the system prompt grew.From the
v0.12.1source, the likely cause is in the OpenAI provider path:chatgpt_instructions_with_selfdev(system)appears to replace the full built system prompt withCHATGPT_INSTRUCTIONSplus only the self-dev section, effectively droppingAGENTS.md/ prompt overlay sections for ChatGPT OAuth mode.Expected behavior
If Jcode loads and counts instruction files/overlays in the built system prompt, all providers should receive them consistently unless there is an explicit documented limitation.
Suggested fix
For ChatGPT OAuth mode, preserve the full
systemprompt or explicitly merge the generated ChatGPT instructions with all user/project/global instruction sections, not just self-dev.2. Need a real provider-disable policy, especially for Copilot
Copilot currently appears as an available provider and may be surfaced by automatic/provider discovery when the environment or local credentials contain GitHub-related state. This is surprising if the user does not want Copilot used or shown.
I tried adding a config concept like:
but this does not seem to be implemented/enforced in
v0.12.1.Expected behavior
There should be a fail-closed way to disable providers globally or per project, for example:
When disabled, the provider should be excluded from:
jcode login --provider copilotThe current automatic behavior is not logical for users who explicitly do not want a provider to be available.
3. Resume UX:
No terminal found. Resume manually:should not force manual resumeThere is also a frustrating resume flow where Jcode prints something like:
This forces the user to manually copy/run a resume command instead of Jcode automatically resuming or attaching to the session.
Expected behavior
If a session can be resumed, Jcode should resume/attach automatically when possible. If terminal launching is unavailable, there should be a non-interactive fallback path that continues in the current context or clearly explains why automatic resume is impossible.
Environment
v0.12.1Thanks for considering these. The first issue is especially confusing because prompt accounting suggests the overlay is present, but the actual provider request path drops it for ChatGPT mode.