Skip to content

Add steerable second opinion task manager - #17

Merged
SSHdotCodes merged 7 commits into
mainfrom
agent/second-opinion-task-manager
Aug 3, 2026
Merged

Add steerable second opinion task manager#17
SSHdotCodes merged 7 commits into
mainfrom
agent/second-opinion-task-manager

Conversation

@SSHdotCodes

@SSHdotCodes SSHdotCodes commented Aug 3, 2026

Copy link
Copy Markdown
Owner

What changed

  • adds a lightweight native Tk task-manager window for Second Opinion jobs on macOS, Windows, and Linux
  • adds an equivalent interactive terminal manager and app/terminal/no-window selection
  • lets users inspect live output, steer tasks, change the next-turn model, stop, retry, archive, restore, and create work
  • keeps every turn on its specialized Codex, Claude Code, OpenCode, Grok Build, or Antigravity CLI harness
  • adds atomic cross-process job metadata, detached turn workers, bounded log display, docs, site copy, and release notes
  • adds GitHub Actions CI across Ubuntu, macOS, and Windows on Python 3.10 and 3.13

Why

Second Opinion background jobs were previously visible only through jobs and wait. This makes agent-spawned tasks directly observable and steerable without embedding into or modifying the coding-agent applications.

The native manager is optional but opens by default for background tasks. Users can choose --manager terminal, --manager none, --no-window, or set SECOND_OPINION_MANAGER globally.

Validation

  • ruff check bin/second-opinion tests
  • python3 -m unittest discover -s tests -v (24 tests)
  • python3 -m py_compile bin/second-opinion
  • bash -n install.sh
  • standalone single-file CLI install/status/dry-run smoke test
  • native macOS window and new-task-dialog visual QA
  • interactive terminal manager smoke test

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: efa6f52978

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread bin/second-opinion
Comment on lines +1132 to +1133
prompt = build_followup_prompt(job, clean_message)
cmd = command_for_agent(agent, cwd=cwd, mode=mode, prompt=prompt, model=model, trust=trust)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Build queued prompts only when their turn begins

When a steering message is sent during an active turn, this snapshots the log immediately, so the queued command permanently contains only partial output (or no output) from the active turn. Once that turn finishes, the follow-up therefore runs without the result it is supposed to continue from; multiple queued messages similarly cannot see earlier queued turns. Build the follow-up prompt and command when the worker claims the turn rather than when the message is enqueued.

Useful? React with 👍 / 👎.

Comment thread bin/second-opinion
Comment on lines +1155 to +1157
updated = update_job(job_id, append_turn)
if job_status(updated) != "running":
spawn_job_worker(job_id)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Claim worker ownership atomically before spawning

If two manager processes enqueue messages for the same idle job concurrently, both can finish update_job with a non-running snapshot before either calls spawn_job_worker, causing two workers to be launched. Those workers can claim separate queued turns and run their provider commands concurrently in the same workspace, or even race over the same turn, defeating the promised serialized steering workflow. The running check and worker reservation need to occur as one locked state transition.

Useful? React with 👍 / 👎.

@SSHdotCodes
SSHdotCodes merged commit f18fbde into main Aug 3, 2026
6 of 7 checks passed
@SSHdotCodes
SSHdotCodes deleted the agent/second-opinion-task-manager branch August 3, 2026 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants