Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

`--once` against an open conversation is refused with a sentence nothing documents

未关闭
#1,338 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
76/100
Issue 类型
文档
描述清晰度
描述清楚
活跃度
活跃
技术栈
go
领域
cli, documentation

调研方向

Start with errExecutionMode and its check in internal/remote/server.go, then read internal/manual/chat/running-from-the-terminal.md and docs/changes/unreleased/1071-approvals-wheel.md. Run the manual probe in internal/manual/chat_test.go and the stated interactive and control e2e cases. Done means the refusal wording, manual explanation, probe, and invalidates entry agree exactly.

由索引模型根据 Issue 内容生成。

描述

area:headless area:remote bug sev:papercut

What happened

2026-09-21, PR #1071 at 78ddda475 (on dev@49b4a58fb). The fix round on that PR made headless roads (codeaf chat --once, and any Hello with Headless set) build their own approval gate and refuse to attach to an agent that was built interactive, or the reverse. The refusal is one sentence, errExecutionMode in internal/remote/server.go:

this conversation is already open in a different interactive or headless mode; close it before retrying

It is the right default: a headless caller reusing an already-open interactive agent would inherit that agent's gate, which is the bypass the fix exists to close. But it is a new refusal on a road people script against, nothing documents it, and the sentence does not say which mode holds the conversation, where, or what "close it" means for someone who has the interactive session open in another terminal on purpose. Neither docs/changes/unreleased/1071-approvals-wheel.md nor any page under internal/manual/chat/ mentions it, so the chat cannot answer "why does --once say the conversation is already open".

Replication

Deterministic (no model).

The errExecutionMode path in internal/remote/server.go is reached whenever a hello's Headless disagrees with the mode the agent was opened in; a unit case beside it with a stub engine shows the refusal and its exact bytes. Through the real door: internal/manual/chat_test.go with the probe why does --once say the conversation is already open reaches no page today.

Field (real models).

Open a workspace interactively with codeaf, then from a second shell run codeaf chat --once "say hi" in the same workspace. The second command exits non-zero and prints the sentence above. Needs a provider key only for the first process; the refusal itself costs nothing.

Where

errExecutionMode and its check in internal/remote/server.go; Hello.Headless in internal/remote/wire.go; the --once flag in cmd/codeaf/chatv3.go; internal/manual/chat/running-from-the-terminal.md for the page that should carry it; docs/changes/unreleased/1071-approvals-wheel.md for the entry.

The fix

Three things, all wording:

  1. The refusal names the other side and the way out, on the model of the product's other refusals: this conversation is open interactively in another terminal; --once cannot join it. Close it there, or run --once in a different session. and the mirror sentence when an interactive launch finds a headless holder.
  2. internal/manual/chat/running-from-the-terminal.md gets a ## heading in the asker's words (--once says the conversation is already open) that quotes the sentence and says why it exists: a headless run answers its own approvals and never borrows an open session's gate.
  3. The #1071 change entry's invalidates says that --once used to join an open conversation and now refuses.

Acceptance

  • e2e: an interactive codeaf holding a workspace, then codeaf chat --once "say hi" in the same workspace from a second process: exit code non-zero and the new sentence printed in full.
  • e2e: control: codeaf chat --once "say hi" in a workspace nobody holds runs, prints the reply and exits zero; --once without --yolo still refuses a tool call with needs approval but no resolver is attached.
  • Unit: the manual probe why does --once say the conversation is already open reaches running-from-the-terminal.
  • The manual page quotes the wording exactly as internal/remote/server.go spells it, and the change entry's invalidates names what people believed before.
主要语言
Go
星标
115
派生
14
平均合并
9 小时 37 分钟
30 天内合并 PR
755

环境准备

我们还没有检查这个项目的环境配置文件。先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Agent-Field/CodeAF 的其他 Issue

查看 Agent-Field/CodeAF 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。